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
Rich Trott
874b6b948c benchmark: update obsolete information pointer
A doc suggested in an error message is no longer the place to get the
information about required http benchmarkers. Update the error message
to point to the current location for the information.

PR-URL: https://github.com/nodejs/node/pull/12026
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-26 11:30:29 +02:00
Michaël Zasso
ed12ea371c src: update inspector code to match upstream API
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:12 +01:00
Michaël Zasso
9c9e2d7f4a deps: backport 3297130 from upstream V8
This fixes a build failure on Windows.

Original commit message:

    Rename TypeFeedbackVector to FeedbackVector.

    ... and TypeFeedbackMetadata to FeedbackMetadata.

    BUG=

    Change-Id: I2556d1c2a8f37b8cf3d532cc98d973b6dc7e9e6c
    Reviewed-on: https://chromium-review.googlesource.com/439244
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: Michael Stanton <mvstanton@chromium.org>
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Hannes Payer <hpayer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#42999}

Refs: https://github.com/nodejs/v8/issues/4
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:12 +01:00
Michaël Zasso
07088e6fc1 deps: backport 39642fa from upstream V8
This is an almost clean cherry-pick of the original commit. The only
conflict was related to a rename of an internal class.

Original commit message:

    [async-await] (simpler) fix for Return in try/finally in async functions

    Alternative approach to https://codereview.chromium.org/2667983004/, which
    does not depend on implicit control flow changes from
    https://codereview.chromium.org/2664083002

    - Remove handling for `async function` from Parser::RewriteReturn(). This functionality
    is moved to BytecodeGenerator::BuildAsyncReturn(). This ensures that promise resolution
    is deferred until all finally blocks are evaluated fully.

    - Add a new deferred command (CMD_ASYNC_RETURN), which instructs ControlScope to
    generate return code using BuildAsyncReturn rather than BuildReturn.

    - Parser has a new `NewReturnStatement()` helper which determines what type of return
    statement to generate based on the type of function.

    BUG=v8:5896, v8:4483
    R=littledan@chromium.org, neis@chromium.org, rmcilroy@chromium.org, adamk@chromium.org, gsathya@chromium.org

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

Fixes: https://github.com/nodejs/node/issues/11960
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:11 +01:00
Michaël Zasso
8394b05e20 deps: cherry-pick c5c570f from upstream V8
Original commit message:

    [build] Fix gyp files for building inspector

    This patch fixes compilation of V8 with inspector on Windows as well as
    cross-compilation of the V8 inspector.

    BUG=

    Refs: https://github.com/nodejs/node/pull/10992
    Review-Url: https://codereview.chromium.org/2705423003
    Cr-Commit-Position: refs/heads/master@{#43533}

PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:11 +01:00
Franziska Hinkelmann
3471d6312d deps: cherry-pick 0ba513f05 from V8 upstream
Original commit message:
  [api] Fix DescriptorInterceptor with access check.

  The DescriptorInterceptor should intercept all
  Object.getOwnPropertyDescriptor calls. This CL fixes
  the interceptor's behavior if the iterator state is
  ACCESS_CHECK.

  BUG=

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

PR-URL: https://github.com/nodejs/node/pull/11712
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-25 09:44:11 +01:00
Anna Henningsen
fcc58bf0da deps: cherry-pick a927f81c7 from V8 upstream
Original commit message:

  [ValueSerializer] Allow wire format versions beginning with 13 to be deserialized in non-legacy mode.

  As of version 13, delegates do not need to worry about colliding tags with the
  tags reserved by v8, since v8 inserts a "host object" prefix beforehand. Thus
  the format is now suitable for more general use, without opting into the "legacy"
  mode that had this caveat.

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

PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:11 +01:00
Anna Henningsen
83bf2975ec deps: cherry-pick V8 ValueSerializer changes
Refs: https://github.com/nodejs/node/pull/11048

Below is the list of commits:

deps: cherry-pick 78c0be52d from V8 upstream

Original commit message:

  ValueSerializer: Promote scheduled exceptions from wasm::ErrorThrower.

  wasm::ErrorThrower doesn't actually throw exceptions, it just schedules them.
  As a result, this exception isn't handled properly by code which expects
  ValueDeserializer to actually throw. For instance, the unit tests use a
  TryCatch to catch and handle expected exceptions in unit tests.

  Before this patch, I see local unit test failures because a wasm decode test
  schedules one, but it isn't caught (and instead causes Context::New to fail
  at the beginning of the next test).

  BUG=685713

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

deps: cherry-pick 966355585 from V8 upstream

Original commit message:

  [d8] Use ValueSerializer for postMessage (instead of ad-hoc serializer)

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

deps: cherry-pick bf511b426 from V8 upstream

Original commit message:

  ValueSerializer: Support efficiently reading and writing one-byte strings.

  memcpy is faster than UTF-8 encoding/decoding. This yields 10-20% wins on
  serializing and deserializing long ASCII strings, according to
  blink_perf.bindings -- and these are already in a fast path where the entire
  string is known to be ASCII (but this has to be checked). The win may be
  larger for strings in Latin-1 but not ASCII (though I suspect this is an
  uncommon case).

  A change is also made to make ValueSerializerTest.EncodeTwoByteStringUsesPadding
  survive wire format version number changes.

  This is the first of a series of wire format changes from the previous Blink
  format. The deserializer continues to be able to read the old format, but
  Chromium M56 will no longer be able to read the messages written by this, in M58.

  BUG=chromium:686159

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

deps: cherry-pick 6f1639ed1 from V8 upstream

Original commit message:

  ValueSerializer: Distinguish between 'undefined' and an absent property.

  Dealing with this case requires a wire format change. It is possible that an
  element can be absent even in an array where the dense format was chosen
  (because the array initially had no holes), if the elements are modified while
  they are being serialized. In this case, a new tag for the "hole" is emitted.

  The logic to treat undefined in dense arrays as an absent property is restricted
  to versions of the wire format that this tag did not exist.

  BUG=chromium:686159,chromium:665820

  Review-Url: https://codereview.chromium.org/2660093002
  Cr-Original-Commit-Position: refs/heads/master@{#42784}
  Committed: dc85f4c833
  Review-Url: https://codereview.chromium.org/2660093002
  Cr-Commit-Position: refs/heads/master@{#42800}

deps: cherry-pick c3856de37 from V8 upstream

Original commit message:

  ValueSerializer: Check for zero length before casting to FixedDoubleArray.

  Even though the elements kind is FAST_DOUBLE_ELEMENTS, if length is zero
  the isolate's empty_fixed_array is used. It's illegal to cast this to
  FixedDoubleArray, so we avoid the cast.

  BUG=chromium:686479

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

deps: cherry-pick 591cc0b4c from V8 upstream

Original commit message:

  ValueSerializer: Share string encoding code with String and RegExp objects.

  This avoids the need to pull in the UTF-8 encoding code from the public API,
  and allows it to take advantage of any supported way that i::String can be
  encoded (one- or two-byte).

  Backward compatibility is maintained, but this is the behavior beginning
  with this version.

  BUG=chromium:686159

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

deps: cherry-pick 79837f5f6 from V8 upstream

Original commit message:

  Improve ValueSerializer perf regression after 96635558

  BUG=687196
  R=jbroman@chromium.org

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

deps: cherry-pick 8990399dc from V8 upstream

Original commit message:

  ValueDeserializer: Only allow valid keys when deserializing object properties.

  The serializer won't ever write a more complex object. Not validating this
  allows other things to be used as keys, and converted to string when the
  property set actually occurs. It turns out this gives an opportunity to trigger
  OOM by giving an object a key which is a very large sparse array (whose string
  representation is very large).

  This case is now rejected by the deserializer.

  BUG=chromium:686511

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

deps: cherry-pick 68960eeb7 from V8 upstream

Original commit message:

  ValueDeserializer: Make sure that an exception is the legacy path.

  The entry points to the deserializer are responsible for ensuring that an
  exception is pending by the time they return. Some failures throw exceptions
  themselves, while others (like errors in the format) are exceptions caused by
  the deserializer, not coming from the runtime.

  Like the non-legacy path, a default deserialization exception should be thrown
  in such cases.

  BUG=chromium:693411

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

deps: cherry-pick 3b15d950e from V8 upstream

Original commit message:
  ValueSerializer: Add SetTreatArrayBufferViewsAsHostObjects() flag

  Add `ValueSerializer::SetTreatArrayBufferViewsAsHostObjects()` which
  instructs the `ValueSerializer` to treat ArrayBufferView objects as
  host objects.

  BUG=v8:5926

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

deps: cherry-pick 654351997 from V8 upstream

Original commit message:

  ValueSerializer: Add an explicit tag for host objects.

  This makes it no longer necessary to ensure that V8 and Blink have non-colliding
  tags, which makes it easier for them to evolve independently, and also makes
  the wire format more suitable for other V8 embedders, who would not
  necessarily be surveyed before V8 introduced a new tag that might collide
  with theirs.

  BUG=chromium:686159

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

PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:10 +01:00
Michael Dawson
3f9c8fb87f deps: limit regress/regress-crbug-514081 v8 test
regress/regress-crbug-514081 allocates a 2G block of memory
and if there  are multiple variants running at the
same time this can lead to crashes, OOM kills or
the OS failing to allocate memory.  This patch
limits us to running a single variant of the test

Fixes: https://github.com/nodejs/node/issues/6340
PR-URL: https://github.com/nodejs/node/pull/6678
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2017-03-25 09:44:10 +01:00
Michaël Zasso
89d8dc9afd src: update NODE_MODULE_VERSION to 54
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 5.7.

Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md

PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:10 +01:00
Michaël Zasso
c459d8ea5d deps: update V8 to 5.7.492.69
PR-URL: https://github.com/nodejs/node/pull/11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25 09:44:10 +01:00
Bryan English
e0bc5a7361
process: maintain constructor descriptor
Use the original property descriptor instead of just taking the value,
which would, by default, be non-writable and non-configurable.

PR-URL: https://github.com/nodejs/node/pull/9306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-03-25 00:33:20 +01:00
Chris Burkhart
2141d37452 events: update and clarify error message
Update error message that's thrown when no error listeners are attached
to an emitter.

PR-URL: https://github.com/nodejs/node/pull/10387
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-03-24 16:07:35 -07:00
Timothy Gu
cfc8422a68 lib: use Object.create(null) directly
After V8 5.6, using Object.create(null) directly is now faster than
using a constructor for map-like objects.

PR-URL: https://github.com/nodejs/node/pull/11930
Refs: https://github.com/emberjs/ember.js/issues/15001
Refs: https://crrev.com/532c16eca071df3ec8eed394dcebb932ef584ee6
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 15:25:49 -07:00
Timothy Gu
14a91957f8 url: use a class for WHATWG url[context]
The object is used as a structure, not as a map, which `StorageObject`
was designed for.

PR-URL: https://github.com/nodejs/node/pull/11930
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 15:25:40 -07:00
Timothy Gu
a6e69f8c08 benchmark: add more options to map-bench
PR-URL: https://github.com/nodejs/node/pull/11930
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 15:25:14 -07:00
Sorin Baltateanu
d9b0e4c729 benchmark: repair the fs/readfile benchmark
PR-URL: https://github.com/nodejs/node/pull/7818
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 15:21:21 -07:00
Rich Trott
a45c2db4b6 test: refactor test-cluster-disconnect
Replace `process.once('exit', ...)` with `common.mustCall()`.
Remove unneeded variable in loop declaration.

PR-URL: https://github.com/nodejs/node/pull/11981
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-03-24 11:14:13 -07:00
Ben Noordhuis
9ff7ed23cd lib: fix event race condition with -e
Commit c5b07d4 ("lib: fix beforeExit not working with -e") runs the
to-be-evaluated code at a later time than before because it switches
from `process.nextTick()` to `setImmediate()`.

It affects `-e 'process.on("message", ...)'` because there is now a
larger time gap between startup and attaching the event listener,
increasing the chances of missing early messages.  I'm reasonably
sure `process.nextTick()` was also susceptible to that, only less
pronounced.

Avoid the problem altogether by evaluating the code synchronously.
Harmonizes the logic with `Module.runMain()` from lib/module.js
which also calls `process._tickCallback()` afterwards.

PR-URL: https://github.com/nodejs/node/pull/11958
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-24 09:19:09 -07:00
Luca Maraschi
30f1e8ea04 test: invalid chars in http client path
This test adds coverage for all the characters which are considered
invalid in a http path.

PR-URL: https://github.com/nodejs/node/pull/11964
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 09:14:10 -07:00
Nick Peleh
89d9c3f4a7 test: improve test-vm-cached-data.js
* verify error message by adding 2nd argument to throws in test-assert

PR-URL: https://github.com/nodejs/node/pull/11974
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-03-24 09:10:19 -07:00
Rich Trott
0d000ca51f test: add minimal test for net benchmarks
Currently, benchmark code is not exercised at all in CI. This adds a
minimal test for net benchmarks. If this is deemed acceptable, similar
minimal tests for other benchmarks can be written. Additionally, as
issues and edge cases are uncovered, checks for them can be added.

PR-URL: https://github.com/nodejs/node/pull/11979
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-03-24 09:03:25 -07:00
Yuta Hiroto
abb0bdd53f
test: add test for url
PR-URL: https://github.com/nodejs/node/pull/11999
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
2017-03-25 00:58:11 +09:00
Anna Henningsen
e40ac30e05 doc: document extent of crypto Uint8Array support
PR-URL: https://github.com/nodejs/node/pull/11982
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-03-24 08:50:13 -07:00
DavidCai
4929d12e99 test: add internal/socket_list tests
PR-URL: https://github.com/nodejs/node/pull/11989
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 08:46:05 -07:00
Daniel Bevenius
64af398c26 doc: c++ unit test guide lines
PR-URL: https://github.com/nodejs/node/pull/11956
Ref: https://github.com/nodejs/node/pull/9163
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 08:28:52 -07:00
Daniel Bevenius
6a09a69ec9 build: enable cctest to use generated objects
This commit tries to make it simpler to add unit tests (cctest) for
code that needs to test node core funtionality but that might not be
appropriate as an addon or a JavaScript test. An example of this could
be adding functionality targeted for situations when Node itself is
embedded.

Currently it was not as easy, or efficient, as one would have hoped to
add such tests. The object output directories vary for different
operating systems which we need to link to so that we don't have an
additional compilation step.

PR-URL: https://github.com/nodejs/node/pull/11956
Ref: https://github.com/nodejs/node/pull/9163
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24 08:28:43 -07:00
Morgan Brenner
a8a042a6d3 build: add lint option to vcbuild.bat help
PR-URL: https://github.com/nodejs/node/pull/11992
Fixes: https://github.com/nodejs/node/issues/11971
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-24 08:22:39 -07:00
Richard Lau
cb6c0c14eb doc: add richardlau to collaborators
PR-URL: https://github.com/nodejs/node/pull/12020
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-03-24 08:48:40 -04:00
ghaiklor
348cc80a3c tls: make rejectUnauthorized default to true
rejectUnauthorized used to be false when the property was undefined or
null, quietly allowing client connections for which certificates have
been requested (requestCert is true) even when the client certificate
was not authorized (signed by a trusted CA). Change this so
rejectUnauthorized is always true unless it is explicitly set to false.

PR-URL: https://github.com/nodejs/node/pull/5923
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-23 13:27:56 -07:00
Joyee Cheung
ee19e2923a url: show input in parse error message
PR-URL: https://github.com/nodejs/node/pull/11934
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-23 07:59:50 -07:00
Vse Mozhet Byt
2dff3a22fe test: do not use more command on Windows
PR-URL: https://github.com/nodejs/node/pull/11953
Fixes: https://github.com/nodejs/node/issues/11469
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-03-23 05:52:35 +02:00
Rich Trott
8a639bb696 doc: update collaborator email address
Per email conversation with Shigeki Ohtsu, updating email address in
docs. The current listed email address does not work anymore.

PR-URL: https://github.com/nodejs/node/pull/11996
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org>
2017-03-23 10:35:11 +09:00
Kat Marchán
e1834ff5da deps: upgrade npm to 4.2.0
PR-URL: https://github.com/nodejs/node/pull/11389
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-03-22 18:27:31 -04:00
Sakthipriyan Vairamani (thefourtheye)
caf9ae748b lib,src: make constants not inherit from Object
Make sure `constants` object and all the nested objects don't inherit
from `Object.prototype` but from `null`.

PR-URL: https://github.com/nodejs/node/pull/10458
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-22 15:02:43 -07:00
DavidCai
221b03ad20 events, doc: check input in defaultMaxListeners
PR-URL: https://github.com/nodejs/node/pull/11938
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-22 13:59:45 -07:00
Shigeki Ohtsu
81ab78e62e timers: fix not to close reused timer handle
The timer handle is reused when it is unrefed in order to avoid new
callback in beforeExit(#3407). If it is unrefed within a setInterval
callback, the reused timer handle is closed so that setInterval no
longer keep working. This fix does not close the handle in case of
setInterval.

PR-URL: https://github.com/nodejs/node/pull/11646
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-22 10:47:52 -07:00
Nikolai Vavilov
43fa0a8847 benchmark: allow multiple values for same config
This allows running a benchmark with two or more values for the same
config rather than just one or all of them, for example:

```
node benchmark/buffers/buffer-creation.js type=buffer() type=fast-alloc type=fast-alloc-fill
```

PR-URL: https://github.com/nodejs/node/pull/11819
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-22 19:41:24 +02:00
Luigi Pinca
e0a9ad1af2 http: avoid retaining unneeded memory
Prevent the events listeners of the sockets obtained with the HTTP
upgrade mechanism from retaining unneeded memory.

Ref: https://github.com/nodejs/node/issues/11868
PR-URL: https://github.com/nodejs/node/pull/11926
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-22 10:26:02 -07:00
Kunal Pathak
4eb194a2b1 lib: Use regex to compare error message
To make node engine agnostic, use better comparison method for error
message.

Lazily populate the `circular reference` error message thrown
by `JSON.stringify()` which can be used to compare the error
message thrown.

PR-URL: https://github.com/nodejs/node/pull/11854
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-22 09:54:56 -07:00
Ben Noordhuis
86d74a248b tls: fix SecurePair external memory reporting
Ensure that AdjustAmountOfExternalAllocatedMemory() is called when
the SecurePair is destroyed.  Not doing so is not an actual memory
leak but it makes `process.memoryUsage().external` wildly inaccurate
and can cause performance problems due to excessive garbage collection.

PR-URL: https://github.com/nodejs/node/pull/11896
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-03-22 09:41:04 -07:00
Daniel Bevenius
be98f26917 src: exclude node_root_certs when use-def-ca-store
When configuring node with --openssl-use-def-ca-store the root certs
from OpenSSL should be used and not the ones in src/node_root_certs.h.
I noticed that src/node_root_certs.h is still included even when
using --openssl-use-def-ca-store.

This commit adds check and does not include node_root_certs.h if
--openssl-use-def-ca-store is specified.

PR-URL: https://github.com/nodejs/node/pull/11939
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-22 09:26:53 -07:00
Ben Noordhuis
f35e80d9af src: use persistent strings from node::Environment
Replace a few calls to FIXED_ONE_BYTE_STRING() with their persistent
counterparts from `node::Environment`.  None of the calls are in hot
code paths but why create a new string when one already exists?

PR-URL: https://github.com/nodejs/node/pull/11945
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-22 09:19:48 -07:00
Anna Henningsen
64d0a73574 test: minor fixups for REPL eval tests
The `process.on("exit")` event handlers are unnecessary, so it’s okay
to drop them.

PR-URL: https://github.com/nodejs/node/pull/11946
Ref: https://github.com/nodejs/node/pull/11871
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-03-22 09:17:34 -07:00
Vse Mozhet Byt
76279cbb5c doc: correct info in child_process.md
`child.stderr`, `child.stdin`, and `child.stdout`
are `null`, not `undefined`, if the relevant `stdio` properties
are set to anything other than 'pipe'.

PR-URL: https://github.com/nodejs/node/pull/11949
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-22 09:16:02 -07:00
Danny Nemer
c8eec76c5f readline: rename deDupeHistory option
Renames `options.deDupeHistory` → `options.removeHistoryDuplicates` for
`readline.createInterface(options)`.

The option name `removeHistoryDuplicates` is preferable to the
semantically identical name `deDupeHistory` because "dedupe" (short for
"deduplication") is obscure and neologistic while
`removeHistoryDuplicates` is clear, though verbose.

Updates tests and documentation for this option accordingly.

PR-URL: https://github.com/nodejs/node/pull/11950
Ref: https://github.com/nodejs/node/pull/2982
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-22 08:56:24 -07:00
James M Snell
e26b6c6baa src: add native URL class
Adds a URL native class for use within the node.js c/c++
code. This is primarily intended to be used by the eventual
ES6 modules implementation but can be used generally wherever
URL parsing within the c/c++ may be necessary.

```c
URL url1("http://example.org");
URL url2("foo", "http://example.org/bar");
URL url3("baz", &url2);
```

While we're at it, reduce reliance on macros to simplify impl.

PR-URL: https://github.com/nodejs/node/pull/11801
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-03-22 08:44:04 -07:00
Rich Trott
fbb853f52b doc: remove superfluous sample assert code
Remove superfluous sample code. Since `assert()` is documented as an
alias of `assert.ok()` and nothing more, the sample code for
`assert.ok()` is sufficient.

PR-URL: https://github.com/nodejs/node/pull/11933
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-21 23:33:30 -07:00
DavidCai
a00c9e95e4 errors: remove needless lazyAssert
PR-URL: https://github.com/nodejs/node/pull/11891
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-21 23:29:03 -07:00
Bradley Farias
757ff8071e doc: require uses fs root for '/' prefix
PR-URL: https://github.com/nodejs/node/pull/11897
Fixes: https://github.com/nodejs/node/issues/7151
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-21 23:06:52 -07:00