0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

17025 Commits

Author SHA1 Message Date
Daniel Bevenius
ec53921d2e src: make AtExit callback's per Environment
This commit attempts to address one of the TODOs in
https://github.com/nodejs/node/issues/4641 regarding making the
AtExit callback's per environment, instead of the current global.

bnoordhuis provided a few options for solving this, and one was to
use a thread-local which is what this commit attempts to do.

PR-URL: https://github.com/nodejs/node/pull/9163
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2017-04-12 13:11:39 +02:00
Daniel Bevenius
de168b4b4a src: guard bundled_ca/openssl_ca with HAVE_OPENSSL
Currently, the following warning will be reported when configuring
without-ssl:

../src/node.cc:3653:8: warning: unused variable 'use_bundled_ca'
[-Wunused-variable]
  bool use_bundled_ca = false;
       ^
../src/node.cc:3654:8: warning: unused variable 'use_openssl_ca'
[-Wunused-variable]
  bool use_openssl_ca = false;
       ^

I missed this when working on
commit 8a7db9d4b5 ("src: add
--use-bundled-ca --use-openssl-ca check").

Refs: https://github.com/nodejs/node/pull/12087
PR-URL: https://github.com/nodejs/node/pull/12302
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-12 13:01:50 +02:00
Daniel Bevenius
f9bc83557d src: guard default_inspector_port
When configuring and building --without-ssl the following warning is
reported:
../src/node_debug_options.cc:12:11: warning: unused variable
'default_inspector_port' [-Wunused-const-variable]
const int default_inspector_port = 9229;

The commit adds a HAVE_INSPECTOR guard to this constant.

PR-URL: https://github.com/nodejs/node/pull/12303
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-12 12:54:10 +02:00
Ali Ijaz Sheikh
a235ccd168 src,test: debug is now an alias for inspect
`node debug` is now an alias of `node inspect`. This is intended to be
a minimal change – it does not get rid of the the debugger code. That
can be done in a follow-on.

PR-URL: https://github.com/nodejs/node/pull/11441
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: joshgav - Josh Gavant <josh.gavant@outlook.com>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
2017-04-11 17:58:26 -07:00
Ali Ijaz Sheikh
b7608ac707 deps: cherry-pick node-inspect#43
Node 8.x no longer has --debug-brk.

Ref: https://github.com/nodejs/node-inspect/pull/43
PR-URL: https://github.com/nodejs/node/pull/11441
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: joshgav - Josh Gavant <josh.gavant@outlook.com>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
2017-04-11 17:58:26 -07:00
Vse Mozhet Byt
a91242569a doc: modernize and fix code examples in path.md
Unify spaces, quotes, and semicolons. Update output examples.

PR-URL: https://github.com/nodejs/node/pull/12296
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-12 03:21:47 +03:00
Eugene Ostroukhov
42be835e05 inspector: fix Coverity defects
PR-URL: https://github.com/nodejs/node/pull/12272
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-11 15:58:05 -07:00
Italo A. Casas
b8f416023d
2017-04-11, Version 7.9.0 (Current)
Notable changes:

* util: console is now closer to what is supported in all major browsers
(Roman Reiss) [#10308](https://github.com/nodejs/node/pull/10308)

PR-URL: https://github.com/nodejs/node/pull/12319
2017-04-11 13:39:32 -04:00
Ben Noordhuis
affe0f2d2a n-api: fix -Wmismatched-tags compiler warning
`napi_env__` was declared as a struct in one place and a class in
another.

PR-URL: https://github.com/nodejs/node/pull/12333
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-11 15:58:32 +02:00
João Reis
c1670b6225 deps,win: increase msvs_shard in gyp for V8
Increase the number of shards to divide v8_base into. This increases
the number of calls to cl.exe but decreases the number of files
compiled each time.

Fixes: https://github.com/nodejs/v8/issues/4
PR-URL: https://github.com/nodejs/node/pull/12184
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-11 11:24:40 +01:00
João Reis
6cfedf0481 build,win: limit maxcpucount to 2 for MSBuild
MSBuild invokes cl.exe with /MP (set in common.gypi), making it
compile sources in parallel using a number of internal processes
equal to the number of effective processors. MSBuild /m uses a
similar mechanism, so the number of compiler processes can grow to
the number of effective processors squared.

This limits MSBuild to 2 processes, to still use some parallelization
while requiring less memory. Cl.exe is still invoked with /MP, thus
the maximum number of processes is limited to twice the number of
effective processors.

PR-URL: https://github.com/nodejs/node/pull/12184
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-11 11:24:40 +01:00
Karl Cheng
eb49d596b4 test: fix allocUnsafe uninitialized buffer check
Fixes parallel/test-buffer-bindingobj-no-zerofill to properly check
that buffers created with `Buffer.allocUnsafe()` are not zero-filled.

The test introduced in #11706 passes even if the buffer has been
zero-filled and fails if none of the buffer values are zero.

Refs: https://github.com/nodejs/node/pull/11706
PR-URL: https://github.com/nodejs/node/pull/12290
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-11 02:45:25 -07:00
Vse Mozhet Byt
9b6376a4ee doc: update os.uptime() and process.uptime() info
PR-URL: https://github.com/nodejs/node/pull/12294
Fixes: https://github.com/nodejs/node/issues/12291
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-11 02:35:13 -07:00
Roman Reiss
71704fbc96 doc: add link on logo to README
This is to override GitHub's default behaviour that links to the
image's source file, which isn't very helpful in our case.

PR-URL: https://github.com/nodejs/node/pull/12307
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-11 02:12:55 -07:00
Rich Trott
569f988be7 test: remove disabled tls_server.js
Remove tls_server.js that has been disabled for about 6 years. It
appears to have worked in concert with some other file which has since
been removed. It seems to create a server and set up a bunch of
listeners, but it does not appear to have code that connects to the
server and triggers any of those listeners.

PR-URL: https://github.com/nodejs/node/pull/12275
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-10 22:18:11 -07:00
Joyee Cheung
baa2602539 build: add test-gc-clean and test-gc PHONY rules
PR-URL: https://github.com/nodejs/node/pull/12059
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-11 11:27:22 +08:00
Joyee Cheung
c694633328 build: sort phony rules
Sort phony rules and place them one per line for the ease of
updating and backporting

PR-URL: https://github.com/nodejs/node/pull/12059
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-11 11:26:58 +08:00
taylor.woll
9decfb1521
n-api: implement async helper methods
Based on the async methods we had in abi-stable-node before the napi
feature landed in node/master. Changed this set of APIs to handle
error cases and removed a lot of the extra methods we had for setting
all the pieces of napi_work opting instead to pass all of those as
arguments to napi_create_async_work as none of those parameters are
optional except for the complete callback, anyway.

Renamed the napi_work struct to napi_async_work and replace the
struct itself with a class which can better encapsulate the object
lifetime and uv_work_t that we're trying to wrap anyway.

Added a napi_async_callback type for the async helper callbacks
instead of taking raw function pointers and make this callback take a
napi_env parameter as well as the void* data it was already taking.

Call the complete handler for the async work item with a napi_status
code translated from the uvlib error code.

The execute callback is required for napi_create_async_work, though
complete callback is still optional.

Also added some async unit tests for addons-napi based on the
addons/async_hello_world test.

PR-URL: https://github.com/nodejs/node/pull/12250
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
2017-04-11 01:09:46 +02:00
Taylor Woll
ca786c3734
n-api: change napi_callback to return napi_value
Change `napi_callback` to return `napi_value` directly instead of
requiring `napi_set_return_value`.

When we invoke the callback, we will check the return value and
call `SetReturnValue` ourselves. If the callback returns `NULL`,
we don't set the return value in v8 which would have the same
effect as previously if the callback didn't call
`napi_set_return_value`. Seems to be a more natural way
to handle return values from callbacks. As a consequence,
remove `napi_set_return_value`.

Add a `napi_value` to `napi_property_descriptor` to support string
values which couldn't be passed in the `utf8name` parameter or
symbols as property names. Class names, however, cannot be symbols
so this `napi_value` must be a string type in that case.

Remove all of the `napi_callback_info` helpers except for
`napi_get_cb_info` and make all the parameters to
`napi_get_cb_info` optional except for argc.

Update all the test collateral according to these changes.
Also add `test/addons-napi/common.h` to house some common macros
for wrapping N-API calls and error handling.

PR-URL: https://github.com/nodejs/node/pull/12248
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-10 23:30:03 +02:00
Daijiro Wachi
b470a85f07 url: trim leading slashes of file URL paths
It should trim the slashes after the colon into three for file URL.

PR-URL: https://github.com/nodejs/node/pull/12203
Refs: https://github.com/w3c/web-platform-tests/pull/5195
Fixes: https://github.com/nodejs/node/issues/11188
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-04-10 18:09:06 +02:00
Tobias Nießen
88351a22ed
crypto: handle exceptions in hmac/hash.digest
Forced conversion of the encoding parameter to a string within
crypto.js, fixing segmentation faults in node_crypto.cc.

Fixes: https://github.com/nodejs/node/issues/9819
PR-URL: https://github.com/nodejs/node/pull/12164
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-10 16:37:09 +02:00
Sam Roberts
cecdf7c118
src: use a std::vector for preload_modules
A dynamically allocated array was being used, simplify the memory
management by using std::vector.

PR-URL: https://github.com/nodejs/node/pull/12241
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-10 16:07:30 +02:00
Karl Cheng
2555780aa6
test: check curve algorithm is supported
parallel/test-crypto-dh.js assumes particular curve algorithms
(e.g. Oakley-EC2N-3) are supported, though this may not necessarily be
the case if Node.js was built with a system version of OpenSSL.

PR-URL: https://github.com/nodejs/node/pull/12265
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-10 15:55:12 +02:00
Vse Mozhet Byt
b2a12ee782 doc: fix confusing example in process.md
PR-URL: https://github.com/nodejs/node/pull/12282
Fixes: https://github.com/nodejs/node/issues/12280
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-10 16:16:44 +03:00
Daniel Bevenius
fe016c6cd9 src: use std::list for at_exit_functions
This change was suggested by bnoordhuis in the following comment:
https://github.com/nodejs/node/pull/9163#discussion_r84264628

Not including any tests as this is covered by test/addons/at-exit.

PR-URL: https://github.com/nodejs/node/pull/12255
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-10 07:24:17 +02:00
Daniel Bevenius
65a6e05da5 src: only block SIGUSR1 when HAVE_INSPECTOR
I'm currently seeing a timeout error for test-signal-handler.js on
macosx when using the following configuration:

./configure --debug --without-ssl && make -j8 test

--without-ssl implies that there will be no inspector but the signal
SIGUSR1 is blocked in PlatformInit just the same. But in this case
never unblocked which is causing the signal to never be delivered to
the handlers in test-signal-handler.js and it loops until it times out.

Not sure if this is the best way of fixing this but hopefully more eyes
on this will help.

PR-URL: https://github.com/nodejs/node/pull/12266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-10 07:18:35 +02:00
Jan Krems
1807080d3d
doc: update information on test/known_issues
* Since https://github.com/nodejs/node/pull/6559 known_issues
  does run on CI.
* Add some notes to explain the expectations around tests in
  known_issues.

PR-URL: https://github.com/nodejs/node/pull/12262
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-09 21:45:58 +03:00
Gibson Fahnestock
4dde87620a
build: don't test addons-napi twice
The addons-napi testsuite is already included in $(CI_NATIVE_SUITES), so
we don't need to manually specify it in the test-ci target as well.

PR-URL: https://github.com/nodejs/node/pull/12201
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-04-09 18:27:25 +01:00
Sam Roberts
809ca2ff8f
src: use std::string for trace enabled_categories
A std::string manages its own memory, so using one removes the implicit
assumption that the argv vector passed to node will never be
deallocated. Also, the enabled_categories are used to construct a
std::stringstream, so its simpler to use the standard library
consistently.

PR-URL: https://github.com/nodejs/node/pull/12242
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-04-09 17:35:06 +02:00
Joyee Cheung
2d3d4ccb98 test: add http benchmark test
PR-URL: https://github.com/nodejs/node/pull/12121
Refs: https://github.com/nodejs/node/issues/12068
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-09 18:16:22 +08:00
Joyee Cheung
3e3414f45f benchmark: control HTTP benchmarks run time
PR-URL: https://github.com/nodejs/node/pull/12121
Refs: https://github.com/nodejs/node/issues/12068
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-09 18:16:08 +08:00
Joyee Cheung
a3e71a8901 benchmark: add test double HTTP benchmarker
Refactor benchmark/_http-benchmarkers.js and add a test double
HTTP benchmarker for testing.

PR-URL: https://github.com/nodejs/node/pull/12121
Refs: https://github.com/nodejs/node/issues/12068
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-09 18:16:03 +08:00
Uppinder Chugh
c0953945a8 doc: fix missing argument for dns.resolvePtr()
PR-URL: https://github.com/nodejs/node/pull/12256
Fixes: https://github.com/nodejs/node/issues/12161
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-09 01:13:52 +03:00
Rich Trott
8191af5b29 tools: replace custom new-with-error rule
Use no-restricted-syntax to implement the requirement that `Error`
objects must be thrown with the `new` keyword.

PR-URL: https://github.com/nodejs/node/pull/12249
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-08 12:33:46 -07:00
Timothy Gu
a37273c1e4 util: use V8 C++ API for inspecting Promises
PR-URL: https://github.com/nodejs/node/pull/12254
Refs: https://github.com/nodejs/node/issues/11875
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
2017-04-08 11:07:00 -07:00
Gabriel Schulhof
afd5966fa9 napi: initialize and check status properly
Initialize status to napi_generic_failure and only check it after
having made an actual N-API call.

This fixes up 8fbace163a.

PR-URL: https://github.com/nodejs/node/pull/12283
Ref: https://github.com/nodejs/node/pull/12279
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-04-08 11:43:05 -04:00
Vse Mozhet Byt
14749f9eaf doc: fix confusing reference in net.md
PR-URL: https://github.com/nodejs/node/pull/12247
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-04-08 16:09:22 +03:00
Vse Mozhet Byt
166a15669f doc: modernize and fix code examples in modules.md
* Replace `var` by `const`.
* Fix semicolons.
* Add missing code marks.
* Unify quotes.
* Comment out ellipsis.
* Use object destructuring.
* Use exponentiation operator.
* Replace snake_case by camelCase.

PR-URL: https://github.com/nodejs/node/pull/12224
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-04-08 16:02:01 +03:00
Gibson Fahnestock
96619fc97f
doc: document the performance team
Can be cc'ed with `@nodejs/performance`.

PR-URL: https://github.com/nodejs/node/pull/12213
Refs: https://github.com/nodejs/node/pull/12194#issuecomment-291477258
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-04-08 10:55:45 +01:00
Alexey Orlenko
b03f1f0c01
test: add basic cctest for base64.h
This commit adds C++ tests for `base64_encode()` and `base64_decode()`
functions defined in `base64.h`.  The functionality is already being
tested indirectly in JavaScript tests for Buffer, but it won't hurt to
test the low-level functions too, especially given that they aren't only
used in the internal Buffer implementation, Chrome inspector protocol
support relies upon them too.

PR-URL: https://github.com/nodejs/node/pull/12238
Refs: https://github.com/nodejs/node/pull/12146#issuecomment-291559685
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-04-08 11:57:40 +03:00
Gabriel Schulhof
8fbace163a n-api: cache Symbol.hasInstance
This improves the performance of napi_instanceof() by retrieving
Symbol.hasInstance from the global object once and then storing a
persistent reference to it in the env.

PR-URL: https://github.com/nodejs/node/pull/12246
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-04-07 18:39:08 -04:00
Refael Ackermann
ca8ccb9176 doc: add refack to collaborators
PR-URL: https://github.com/nodejs/node/pull/12277
Refs: https://github.com/nodejs/node/blob/master/doc/onboarding.md
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2017-04-07 18:29:28 -04:00
Rich Trott
971fe67dce test: complete coverage for lib/assert.js
6481c93a modified `lib/assert.js` and added some tests for new
functionality, but left a single line uncovered by tests. This adds a
test that covers the currently-uncovered line (which is the final
`return` statement in `setHasSimilarElement()`).`

PR-URL: https://github.com/nodejs/node/pull/12239
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-07 11:12:29 -07:00
Michael Dawson
c6e0ba31ec doc: update OS level support for AIX
Update OS level supprot for AIX.  Based on discussions
with the AIX team we've have decided that the minimum
support level should be 7.1. This is because support
for AIX 6.1 will likely end during the lifespan of
the upcoming Node version 8 release.

PR-URL: https://github.com/nodejs/node/pull/12235
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-07 12:35:08 -04:00
Alexey Orlenko
6581c35787
doc: add aqrln to collaborators
Add Alexey Orlenko (@aqrln) to the list of collaborators in README.md

PR-URL: https://github.com/nodejs/node/pull/12273
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-04-07 19:32:13 +03:00
Steven
9acd6c9aef doc: add sub domain to host in url
PR-URL: https://github.com/nodejs/node/pull/12233
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-07 09:06:54 -07:00
Jason Ginchereau
84602845c6 n-api: Update property attrs enum to match JS spec
The napi_property_attributes enum used names and values from
v8::PropertyAttribute, but those negative flag names were outdated
along with the default behavior of a property being writable,
enumerable, and configurable unless otherwise specified. To match the
ES5 standard property descriptor those attributes should be positive
flags and should default to false unless otherwise specified.

PR-URL: https://github.com/nodejs/node/pull/12240
Fixes: https://github.com/nodejs/abi-stable-node/issues/221
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-04-07 09:40:21 -04:00
dave-k
943d085307 test: add a second argument to assert.throws()
- a regular expression that matches the entire error message.

PR-URL: https://github.com/nodejs/node/pull/12139
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
2017-04-07 16:22:55 +03:00
Rich Trott
a94a5da78c test: skip irrelevant test on Windows
Skip test-cluster-disconnect-handles on Windows.

PR-URL: https://github.com/nodejs/node/pull/12261
Ref: https://github.com/nodejs/node/pull/12197#issuecomment-292228866
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-06 10:06:14 -07:00
Eugene Ostroukhov
7599b0ef9d debug: activate inspector with _debugProcess
This pull request switches the signal handler to start inspector socket
server instead of the legacy V8 debug protocol.

PR-URL: https://github.com/nodejs/node/pull/11431

Fixes: https://github.com/nodejs/node/issues/8464
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-06 09:10:29 -07:00