0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

20130 Commits

Author SHA1 Message Date
Rich Trott
ff9a6bc1f3 doc: add missing serial commas
PR-URL: https://github.com/nodejs/node/pull/17384
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01 14:46:36 -08:00
Rich Trott
d2b2baf2a5 doc: be concise about serial commas
There is no need to hedge bets on the serial comma. Simply instruct
people to use it.

PR-URL: https://github.com/nodejs/node/pull/17384
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01 14:46:08 -08:00
Jose M. Palacios Diaz
845633a7c6
crypto: better docs for cases where peer's public key is invalid
changes in c++ are in the computeSecret function, but the thrown
exception that was moved to JS land was in BufferToPoint
function, here i let the allocation error be thrown so the only value
returned is the nullptr that i use later to catch the error in
computeSecret, to then construct the exception in JS land.

an ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY error was added to errors.js
and with that, subsequent changes to docs and tests were made.

PR-URL: https://github.com/nodejs/node/pull/16849
Refs: https://www.iacr.org/archive/pkc2003/25670211/25670211.pdf
Fixes: https://github.com/nodejs/node/issues/16625
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-12-01 21:18:11 +01:00
Gus Caplan
31e0dbc0c7
util: use @@toStringTag
uses @@toStringTag when creating the "tag" for an inspected value

PR-URL: https://github.com/nodejs/node/pull/16956
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-01 21:00:33 +01:00
Mithun Sasidharan
f6926d5d00
test: refactored test-http-allow-req-after-204-res to countdown
PR-URL: https://github.com/nodejs/node/pull/17211
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-12-01 20:59:06 +01:00
ChungNgoops
fa072499a5
test: update test/parallel/test-http-pipe-fs.js to use countdown
PR-URL: https://github.com/nodejs/node/pull/17346
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-01 20:54:36 +01:00
Mithun Sasidharan
0f3fd79ee9
test: refactored test-http-response-splitting to use countdown
PR-URL: https://github.com/nodejs/node/pull/17348
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-12-01 20:54:09 +01:00
NiveditN
5282f969c0
test: expanded assertions for console.timeEnd() output
Added assertions to verify that console.time() coerces labels to
strings correctly, by comparing against the expected output values of
console.timeEnd().

This helps resolve https://github.com/nodejs/node/issues/14544 but will
not address the whole thing.

PR-URL: https://github.com/nodejs/node/pull/17368
Refs: https://github.com/nodejs/node/pull/14643
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-12-01 20:53:46 +01:00
Hannes Magnusson
df63e53458
doc: document tls.checkServerIdentity
The funciton was added in eb2ca10462

PR-URL: https://github.com/nodejs/node/pull/17203
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-01 20:44:52 +01:00
Hannes Magnusson
da429c3d20
doc: improve checkServerIdentity docs
PR-URL: https://github.com/nodejs/node/pull/17203
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-12-01 20:44:49 +01:00
Jon Moss
56e8ee1103
src: node_http2_state.h should not be executable
PR-URL: https://github.com/nodejs/node/pull/17408
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01 20:42:08 +01:00
Leko
2355c843ba
test: add test case for process.dlopen with undefined
PR-URL: https://github.com/nodejs/node/pull/17343
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-12-01 20:40:00 +01:00
Leko
4b30287966
test: add test case for throwing an exception with vm.Script
It failed with `FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal`.

PR-URL: https://github.com/nodejs/node/pull/17343
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-12-01 20:39:51 +01:00
Leko
19221d1d6f
src: use non-deprecated versions of ->To*() utils
Squashed from multiple commits:

- src: replace ->To*(isolate) with ->To*(context).ToLocalChecked()

- test: use .As<Object> on Exception::Error

  > Exception::Error always returns an object, so e.As<Object>() should also work fine
  See https://github.com/nodejs/node/pull/17343#discussion_r153232027

- test: use .As<Object> instead of ->ToObject

  we already checked that its a buffer

- src: use FromMaybe instead of ToLocalChecked

  It fixed this test case: 19a1b2e414

- src: pass context to Get()

  Dont pass Local<Context> is deprecated soon.
  So we migrate to maybe version.

- src: return if Get or ToObject return an empty before call ToLocalChecked

Refs: https://github.com/nodejs/node/issues/17244
PR-URL: https://github.com/nodejs/node/pull/17343
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-12-01 20:37:58 +01:00
Tom Hallam
e9e9863ca7
errors: fix typo in TLS_SESSION_ATTACK message
PR-URL: https://github.com/nodejs/node/pull/17388
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01 15:37:26 +01:00
cjihrig
5ebfaa8891
deps: upgrade libuv to 1.18.0
PR-URL: https://github.com/nodejs/node/pull/17282
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-12-01 09:01:04 -05:00
Rich Trott
3327ce0dd2 tools: enable no-return-await lint rule
Enable lint rule that prohibits unnecessary use of `await` with
`return`.

PR-URL: https://github.com/nodejs/node/pull/17265
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-11-30 23:25:12 -08:00
Rich Trott
929f343bb3 doc,test: remove unnecessary await with return instances
Remove unnecessary `await` in combination with `return` in preparation
for enabling lint rule.

PR-URL: https://github.com/nodejs/node/pull/17265
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-11-30 23:24:44 -08:00
Daniel Bevenius
7850112c33 test: make CreateParams stack-allocated
PR-URL: https://github.com/nodejs/node/pull/17366
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-12-01 07:56:39 +01:00
Daniel Bevenius
6aee5fbf99 test: use v8 Default Allocator in cctest fixture
This commit updates the node_test_fixture to use
v8::ArrayBuffer::Allocator::NewDefaultAllocator() and removes the custom
allocator.

PR-URL: https://github.com/nodejs/node/pull/17366
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-12-01 07:56:39 +01:00
Daniel Bevenius
12c8b4d154 tools: add cpplint rule for NULL usage
This commit is a suggestion for adding a rule for NULL usages in the
code base. This will currently report a number of errors which could be
ignored using // NOLINT (readability/null_usage)

PR-URL: https://github.com/nodejs/node/pull/17373
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01 07:45:05 +01:00
Daniel Bevenius
e32bbbf4d7 src: use nullptr instead of NULL
PR-URL: https://github.com/nodejs/node/pull/17373
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01 07:45:00 +01:00
Jon Moss
85e34b0c73 tools: add docs for prefer-util-format-errors rule
I had a little trouble understanding what the rule was trying to say, so
am documenting what would pass/fail.

PR-URL: https://github.com/nodejs/node/pull/17376
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-11-30 16:49:37 -05:00
Evan Lucas
701dc9a86e src: fix typo in NODE_OPTIONS whitelist
The whitelist of allowed cli flags that can be passed in the
NODE_OPTIONS environment variable had --trace-events-categories,
but the cli flag is actually --trace-event-categories.

PR-URL: https://github.com/nodejs/node/pull/17369
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-30 08:19:26 -06:00
Bartosz Sosnowski
61d46dd7e0 tools: add Boxstarter script
Adds a Boxstarter script for easy Node.js building prerequisites installation

PR-URL: https://github.com/nodejs/node/pull/17046
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-11-30 11:35:45 +01:00
Refael Ackermann
fff3792e71
tools,test: use Execute instead of check_output
subprocess.check_output is a python2.7 only feature. Using Execute
allows keeping python2.6 compatibility

PR-URL: https://github.com/nodejs/node/pull/17381
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-11-29 20:33:38 -05:00
Myles Borins
58adb3cedf
deps: backport 3c8195d from V8 upstream
Original commit message:
    Fix map constructor to correctly throw.

    We need to throw before rethrowing, otherwise the exception does
    not trigger a debugger event and is not reported if uncaught.

    R=gsathya@chromium.org, jgruber@chromium.org

    Bug: v8:7047
    Change-Id: I7ce0253883a21d6059e4e0ed0fc56dc55a0dcba6
    Reviewed-on: https://chromium-review.googlesource.com/758372
    Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49237}

Fixes: https://github.com/nodejs/node/issues/17270
PR-URL: https://github.com/nodejs/node/pull/17383
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-11-30 09:47:22 +09:00
Myles Borins
f5ec28daac
Revert "deps: cherry-pick 3c8195d from V8 upstream"
This reverts commit e7f30db1a6.

The original commit included tests for AsyncIterator that broke on 6.2

PR-URL: https://github.com/nodejs/node/pull/17383
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-11-30 09:47:18 +09:00
Myles Borins
f2eaf874ed
doc: add guide to maintaining npm
This is based on the guide found on their wiki

refs: https://github.com/npm/npm/wiki/CLI-Team-Process#submitting-the-new-latest-x-to-nodejs

PR-URL: https://github.com/nodejs/node/pull/16541
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-11-30 09:40:41 +09:00
Matheus Marchini
c9d1704216 doc: fix doc example for cctest
cctest guide example wasn't working because of a few typos.

PR-URL: https://github.com/nodejs/node/pull/17355
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-11-29 19:13:46 -05:00
Jon Moss
b1e6c0d44c errors, child_process: use internal/errors codes
PR-URL: https://github.com/nodejs/node/pull/14998
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-11-29 18:14:27 -05:00
Jan Krems
59e48329d0 module: Set dynamic import callback
This is an initial implementation to support dynamic import in
both scripts and modules. It's off by default since support for
dynamic import is still flagged in V8. Without setting the V8 flag,
this code won't be executed.

This initial version does not support importing into vm contexts.

PR-URL: https://github.com/nodejs/node/pull/15713
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2017-11-29 14:16:43 -08:00
Timothy Gu
b28af4dc26
deps: cherry-pick 1420e44db0 from upstream V8
Original commit message:

    [coverage] Correctly free DebugInfo in the absence of breakpoints

    It's quite possible for DebugInfos to exist without the presence of a
    bytecode array, since DebugInfos are created for all functions for which
    we have a CoverageInfo. Free such objects properly.

    Also move the corresponding deletion of CoverageInfos on unload up
    before the early exit.

    Bug: v8:6000
    Change-Id: Idde45b222290aa8b6828b61ff2251918b8ed2aed
    Reviewed-on: https://chromium-review.googlesource.com/664811
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48024}

Fixes crash when passing Profiler.startPreciseCoverage before
Debug.paused is received.

PR-URL: https://github.com/nodejs/node/pull/17344
Refs: 1420e44db0
Refs: https://github.com/bcoe/c8/pull/6#discussion_r153121287
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-29 11:18:26 -08:00
Anna Henningsen
4503da8a3a
process: add flag for uncaught exception abort
Introduce `process.shouldAbortOnUncaughtException` to control
`--abort-on-uncaught-exception` behaviour, and implement
some of the domains functionality on top of it.

PR-URL: https://github.com/nodejs/node/pull/17159
Refs: https://github.com/nodejs/node/issues/17143
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2017-11-29 15:58:42 +01:00
Anna Henningsen
04e3aa28bb
src: introduce USE() for silencing compiler warnings
PR-URL: https://github.com/nodejs/node/pull/17333
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-29 15:58:42 +01:00
Anna Henningsen
a01267265a
src: remove ClearFatalExceptionHandlers()
At its call sites, `ClearFatalExceptionHandlers()` was used to
make the process crash as soon as possible once an exception occurred,
without giving JS land a chance to interfere.

`ClearFatalExceptionHandlers()` awkwardly removed the current domain
and any `uncaughtException` handlers, whereas a clearer way is to
execute the relevant reporting (and `exit()`) code directly.

PR-URL: https://github.com/nodejs/node/pull/17333
Refs: https://github.com/nodejs/node/pull/17159
Refs: https://github.com/nodejs/node/pull/17324
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-29 15:58:42 +01:00
Leko
3c62f33d7b test: replace function with arrow function
1. Among the list of Code and Learn,
I solved the unfinished task of replacing function with arrow function:
https://github.com/nodejs/code-and-learn/issues/72#issuecomment-345667395

2. Replace arrow function with shorter property syntax
Arrow function makes `this` lexical scope.
But toString expects evaluate `this` in runtime.

3. Replace this with null
makeBlock does not need `this`.
update `this` with `null` to clarify the intent.

PR-URL: https://github.com/nodejs/node/pull/17345
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
2017-11-29 16:10:08 +02:00
Ben Noordhuis
597b3d1941 module: print better message on esm syntax error
Include the offending line in the output and underline the bad token.

Before this commit, it printed "SyntaxError: Unexpected reserved word"
without indicating where the syntax error is.

Now it prints the line and underlines the offending token, like it does
for syntax errors in CJS scripts.

Minor changes are made to the test runner in order to support `*.mjs`
files in test/message.

Fixes: https://github.com/nodejs/node/issues/17277
PR-URL: https://github.com/nodejs/node/pull/17281
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-11-29 12:06:09 +01:00
Michaël Zasso
6c47033024
build: fix test-v8 target
Clean the deps/v8 directory before rebuilding node for the hash seed
test. It is necessary to avoid the script added in [1] to use ignored
files while generating `node-debug-support.cc`.

[1]: https://github.com/nodejs/node/pull/14901

PR-URL: https://github.com/nodejs/node/pull/17269
Fixes: https://github.com/nodejs/node-v8/issues/26
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-11-29 10:46:54 +09:00
Hativ
af78840b19
tls: set ecdhCurve default to 'auto'
For best out-of-the-box compatibility there should not be one default
`ecdhCurve` for the tls client, OpenSSL should choose them
automatically.

See https://wiki.openssl.org/index.php/Manual:SSL_CTX_set1_curves(3)

PR-URL: https://github.com/nodejs/node/pull/16853
Refs: https://github.com/nodejs/node/issues/16196
Refs: https://github.com/nodejs/node/issues/1495
Refs: https://github.com/nodejs/node/pull/15206
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-11-29 00:43:05 +01:00
João Reis
04566d3698 build,win,msi: support WiX with VS2017
PR-URL: https://github.com/nodejs/node/pull/17101
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
2017-11-28 23:11:15 +00:00
Refael Ackermann
41c45fd6d2
doc: clarify fast-track of reversions
PR-URL: https://github.com/nodejs/node/pull/17332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-11-28 17:39:53 -05:00
Anatoli Papirovski
d8bc4f2146
timers: clean up for readability
Remove micro-optimizations that no longer yield any benefits,
restructure timers & immediates to be a bit more straightforward.

Adjust timers benchmarks to run long enough to offer meaningful data.

PR-URL: https://github.com/nodejs/node/pull/17279
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-11-28 16:32:15 -05:00
John-David Dalton
fea1e05ba5 module: rename internalModuleReadFile to internalModuleReadJSON
PR-URL: https://github.com/nodejs/node/pull/17084
Fixes: https://github.com/nodejs/node/issues/17076
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-28 16:21:53 -05:00
Rich Trott
ecbae568b7 test: remove common.tmpDirName
`common.tmpDirName` is used in only one test and can be replaced with
`path.basename(common.tmpDir)`.

PR-URL: https://github.com/nodejs/node/pull/17266
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-11-28 16:17:53 -05:00
Matthew Leon
5ebcb7fcaf doc: fix typo in stream.md
PR-URL: https://github.com/nodejs/node/pull/17357
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-11-28 16:13:33 -05:00
James M Snell
093a870329 http2: use more descriptive names
PR-URL: https://github.com/nodejs/node/pull/17328
Fixes: https://github.com/nodejs/node/issues/15303
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
2017-11-28 10:30:55 -08:00
James M Snell
973b8e0b15 http2: remove unnecessary event handlers
PR-URL: https://github.com/nodejs/node/pull/17328
Fixes: https://github.com/nodejs/node/issues/15303
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
2017-11-28 10:30:50 -08:00
James M Snell
5fe111a1d5 test: fixup test-http2-create-client-secure-session
General improvements to test and verify that a secureConnect
handler is present

PR-URL: https://github.com/nodejs/node/pull/17328
Fixes: https://github.com/nodejs/node/issues/15303
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
2017-11-28 10:30:43 -08:00
James M Snell
1b99542ea4 http2: use 'close' event instead of 'streamClosed'
PR-URL: https://github.com/nodejs/node/pull/17328
Fixes: https://github.com/nodejs/node/issues/15303
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Sebastiaan Deckers <sebdeckers83@gmail.com>
2017-11-28 10:30:39 -08:00