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

17004 Commits

Author SHA1 Message Date
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
Jan Krems
47f8f7462f src: remove support for --debug
In the 2017-04-05 meeting, the CTC agreed to remove support for the
legacy debugger in 8.0.0. This is the first step in this direction.

Refs: https://github.com/nodejs/CTC/issues/94
PR-URL: https://github.com/nodejs/node/pull/12197
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-04-06 09:50:09 +02:00
Refael Ackermann
e139dae157
build: fix path voodoo in icu-generic.gyp
Intention was to get to `PRODUCT_DIR` so no need to do path voodoo
Also added `'msvs_quote_cmd': 0` and more precise quoting

PR-URL: https://github.com/nodejs/node/pull/11217
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
2017-04-06 08:21:46 +01:00
Daniel Bevenius
23498f259d deps: backport ec1ffe3 from upstream V8
This commit adds lldbinit files from upstream V8 and also adds these so
that they get installed when `make install` is run.

Original commit message:

[tools] add lldbinit

    The goal of this commit is to add the equivalent to gdbinit but
    for lldb. I've tried to replicate the commands as close as possible
    but I'm unsure about the jss command and hoping to get some feedback
    on it in addition to the bta command which I'm not sure how/when
    this could be used. This is probably just inexperience on my part.

    The lldbinit file can be placed into a directory prefixed with dot
    (.lldbinit) and the python script is currently expected to be in the
    same directory. The path to the script can be changed manually if
    needed as well.

    NOTRY=true

    Review-Url: https://codereview.chromium.org/2758373002
    Cr-Commit-Position: refs/heads/master@{#44136}

PR-URL: https://github.com/nodejs/node/pull/12061
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-06 07:42:33 +02:00
Rich Trott
65c100ae8b test: remove disabled debugger test
The current debugger is slated for removal soon. The debugger test that
has been disabled for over four years is unlikely to be repaired at this
point. Remove the test and its associated fixture.

PR-URL: https://github.com/nodejs/node/pull/12199
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2017-04-05 18:56:48 -07:00
Rich Trott
01460776fe doc: update pull request template URL layout
Putting the link for the commit guideline at the bottom of the pull
request template makes it a bit confusing when opening a pull request as
the markdown does not render. Not everyone is familiar with the syntax
used there and it is easy to mess it up (for example, by not leaving a
blank line above it). It is more natural and useful if the URL is
included inline.

PR-URL: https://github.com/nodejs/node/pull/12216
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-05 18:41:38 -07:00
alejandro
51587b2202 buffer: preallocate array with buffer length
Because the final array length is known, it's better to allocate its
final length at initialization time to avoid future reallocations.

Also add an explicit buffer length greater than 0 comparison so
it's more readable, avoids the internal ToBoolean call and follows the
standard Node.js API format (as it can be checked in other similar
structures where 'length > 0' is preferred over 'length')

PR-URL: https://github.com/nodejs/node/pull/11733
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-04-05 18:36:09 -07:00
Matt Loring
ebeee853e6 src: Update trace event macros to V8 5.7 version
src/tracing/trace_event.h was updated by applying the following changes:

1) Include src/tracing/trace_event_common.h instead of the one from v8
base.

2) Replace all instances of base::Atomic with intptr_t (trace events can
only be generated from the main thread for now).

3) Replace instances of V8_INLINE with inline.

4) Eliminate uses of DCHECK.

5) Eliminate uses of V8_UNLIKELY, the branch predictor should be good
enough alone.

6) Change the namespace used by trace_event.h from v8::internal::tracing
to node::tracing.

7) Remove CallStatsScopedTracer class and related macros (they rely on
V8 implementation details).

8) Change ConvertableToTraceFormat to v8::ConvertableToTraceFormat.

9) Add function "static void SetCurrentPlatform(v8::Platform*
platform);" to the declaration of TraceEventHelper.

PR-URL: https://github.com/nodejs/node/pull/12127
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2017-04-05 15:56:00 -07:00
Gabriel Schulhof
0a5bf4aee3 n-api: create napi_env as a real structure
1. We define struct napi_env__ to include the isolate, the last
exception, and the info about the last error.

2. We instantiate one struct napi_env__ during module registration and
we pass it into the FunctionCallbackInfo for all subsequent entries into
N-API when we create functions/accessors/finalizers.

Once module unloading will be supported we shall have to delete the
napi_env we create during module init.

There is a clear separation between public and private API wrt. env:

1. Public APIs assert that env is not nullptr as their first action.

2. Private APIs need not validate env. They assume it's not nullptr.

PR-URL: https://github.com/nodejs/node/pull/12195
Fixes: https://github.com/nodejs/abi-stable-node/issues/198
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-04-05 15:49:43 -04:00
Michael Dawson
491d59da84 napi: supress invalid coverity leak message
Coverity was complaining that finalizer was being
leaked in this method, however it should be
freed when the buffer is finalized so I believe
the message is invalid.

Add the required comments to suppress the warning.

PR-URL: https://github.com/nodejs/node/pull/12192
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
2017-04-05 12:52:53 -04:00
Michael Dawson
4a21e398d6 n-api: break dep between v8 and napi attributes
The v8 n-api implementation had been depending on a one-to-one
relationship between v8 and n-api v8 property attributes.
Remove this dependency and fix coverity scan issue
165845.

PR-URL: https://github.com/nodejs/node/pull/12191
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-04-05 12:49:25 -04:00
Daniel Bevenius
1f74b9fc35 build: add checks for openssl configure options
Currently it is possible to configure using --without-ssl and
--shared-openssl/--openssl-no-asm/openssl-fips without an error
occuring.

The commit add check for these combinations:

$ ./configure --without-ssl --shared-openssl
Error: --without-ssl is incompatible with --shared-openssl

$ ./configure --without-ssl --openssl-no-asm
Error: --without-ssl is incompatible with --openssl-no-asm

$ ./configure --without-ssl --openssl-fips=dummy
Error: --without-ssl is incompatible with --openssl-fips

PR-URL: https://github.com/nodejs/node/pull/12175
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2017-04-05 08:27:11 +02:00
Daniel Bevenius
b3db91710b build: make configure print statements consistent
I noticed that few of the print statements in configure have a leading
space with is not consistent with the rest of the file. Not sure if
this intentional or not so creating this commit just to bring it up
just in case.

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

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: mhdawson - Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2017-04-05 08:19:58 +02:00
Vse Mozhet Byt
505936309d doc: modernize and fix code examples in https.md
* Replace `var` by `const`.
* Comment out ellipses.
* Update code example (provide relevant file path, add missing option).

PR-URL: https://github.com/nodejs/node/pull/12171
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-05 04:02:41 +03:00
Brian White
b76a350a19 url: avoid instanceof for WHATWG URL
PR-URL: https://github.com/nodejs/node/pull/11690
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-04-04 17:36:37 -07:00
Vinay Hiremath
82ef00cc0a doc: fix string interpolation in Stream 'finish'
PR-URL: https://github.com/nodejs/node/pull/12221
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-04-05 01:29:05 +03:00
DavidCai
610ac7d858 test: increase coverage of internal/socket_list
PR-URL: https://github.com/nodejs/node/pull/12066
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-04 11:50:36 -07:00
Luca Maraschi
085c1f8f60 test: refactor mkdtemp test and added async
This test refactored the original test for mkdtempSync prefix validation
and added the test also for the async function mkdtemp.

PR-URL: https://github.com/nodejs/node/pull/12080
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@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: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-04-04 11:48:49 -07:00
Alexey Orlenko
f4e8a6f1f0 test: add Unicode characters regression test
This test ensures that UTF-8 characters can be used in core JavaScript
modules built into Node's binary.

PR-URL: https://github.com/nodejs/node/pull/11423
Ref: https://github.com/nodejs/node/pull/11129
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-04 11:14:14 -07:00
Jason Marsh
f62d9fc89f doc: add table of contents to README.md
PR-URL: https://github.com/nodejs/node/pull/11635
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-04-04 11:09:21 -07:00
Brian White
b40dab553f linkedlist: remove unused methods
PR-URL: https://github.com/nodejs/node/pull/11726
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2017-04-04 10:59:44 -07:00
Refael Ackermann
394b6ac5cb test: more robust check for location of node.exe
look for the actual produced `exe` not just the directory

PR-URL: https://github.com/nodejs/node/pull/12120
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
2017-04-04 10:57:35 -07:00