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

22589 Commits

Author SHA1 Message Date
Rich Trott
77d3f141cf doc: add notable-change to onboarding.md exercise
Pull requests that add new Collaborators should be labeled
`notable-change`. Make a note of this in onboarding.md.

PR-URL: https://github.com/nodejs/node/pull/21040
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-02 02:25:34 +02:00
Yuta Hiroto
923f6ac08f
benchmark: fix "comparisons"' typo
PR-URL: https://github.com/nodejs/node/pull/21085
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-06-02 08:07:22 +09:00
Rich Trott
c524576a6f doc: remove link prediction from STYLE_GUIDE.md
Remove promise to eventually link an example document to show level-one
heading. The style guide has been fine without the example doc for a
long time. The statement is already clear. And the style guide itself is
an example. We don't link to examples of wrapping at 80 characters, for
example. There's no need to link just to show what a level-one heading
is. (And if level-one heading is unclear, then it may be preferable to
improve the terminology rather than to link to an example.)

PR-URL: https://github.com/nodejs/node/pull/21031
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-02 00:25:36 +02:00
Rich Trott
6cda5a98fd lib: use focused ESLint disabling in util.js
Instead of disabling all ESLint rules for two lines that require a
violation of no-control-regex, disable only the no-control-regex rule.

PR-URL: https://github.com/nodejs/node/pull/21041
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-02 00:15:51 +02:00
Rich Trott
cbd82a927f doc: remove POST_STATUS_TO_PR from onboarding.md
POST_STATUS_TO_PR is checked/enabled by default so there is no longer a
need to mention that it should be checked in onboarding.md. There is
almost never a situation when it should be unchecked.

PR-URL: https://github.com/nodejs/node/pull/21042
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-02 00:11:54 +02:00
Rich Trott
7afe6c728e doc: fix typos on e.g. abbreviations
`eg.` was used in two places where `e.g.` was intended. Replace one
instance with `e.g.` and rewrite the other instance to not require the
abbreviation at all.

PR-URL: https://github.com/nodejs/node/pull/21045
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2018-06-01 23:54:18 +02:00
Rich Trott
69528b0e86 test: remove unused empty fixture
The not-quite-empty directory called "empty" in fixtures was replaced in
tests with `tmpdir.path` (after calling `tmpdir.refresh()` to ensure
that it is empty). The fixture is removed in this commit.

PR-URL: https://github.com/nodejs/node/pull/21044
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-01 23:44:04 +02:00
Rich Trott
c903a9e0c0 test: avoid empty fixture in module test
Refactor test-module-loading to use tmpdir for its empty directory
rather than using a not-actually-empty directory called "empty" in
fixtures.

PR-URL: https://github.com/nodejs/node/pull/21044
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-01 23:44:02 +02:00
Rich Trott
de8ef3f954 test: avoid empty fixture in fs test
Refactor test-fs-error-messages to use tmpdir for its empty directory
rather than using a not-actually-empty directory called "empty" in
fixtures.

PR-URL: https://github.com/nodejs/node/pull/21044
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-01 23:44:01 +02:00
Rich Trott
42dbb60819 doc: use "is" rather than "has been"
In deprecations.md, there are many uses of "has been" that are mildly
awkward. This changes several instances of things like "fhqwhgads() has
been deprecated" to "fhqwhgads() is deprecated".

Especially for non-native speakers, present tense is generally easier to
read and understand than past participles. (Or at least that's my
experience reading things in languages other than English.)

PR-URL: https://github.com/nodejs/node/pull/21043
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 23:40:59 +02:00
Rich Trott
dce6d53e6b doc: move upstream information to onboarding doc
Move information about setting `upstream` remote and updating from
`upstream` out of `onboarding-extras` and into `onboarding`. Previously,
a link was provided in `onboarding` to the section. This puts all the
git setup information for Collaborator onboardings in one place.

PR-URL: https://github.com/nodejs/node/pull/21029
Reviewed-By: Jon Moss <me@jonathanmoss.me>
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: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-01 14:01:10 +02:00
Rich Trott
7dca3297bc
doc: remove vestigial onboarding section
The onboarding-extras doc includes a section with a single bullet point
instructing the new Collaborator to write good pull request
descriptions. This material is likely superfluous and is in the wrong
document if it is not. (It more properly belongs in pull-requests.md as
it is information that is not specific to new Collaborators.) I am not
putting it in pullrequests.md because that document is already plenty
long and detailed, and includes advice on writing good commit messages,
which tend to become the pull request descriptions anyway.

PR-URL: https://github.com/nodejs/node/pull/21028
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-01 12:47:26 +02:00
Joyee Cheung
df16d20f75
doc: add guides on writing tests involving promises
Mention `common.crashOnUnhandledRejection()` and wrapping the
handlers in `common.mustCall()` or `common.mustNotCall()`.

PR-URL: https://github.com/nodejs/node/pull/20988
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 12:40:48 +02:00
Simen Bekkhus
529b173cf3
doc: remove invalid vm.Script arguments
PR-URL: https://github.com/nodejs/node/pull/20984
Fixes: https://github.com/nodejs/node/issues/20982
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 11:23:06 +02:00
Anna Henningsen
e1df6881c5
src: do not cache NumberOfHeapSpaces() globally
While `NumberOfHeapSpaces()` currently returns a constant value,
that is not strictly guaranteed by the V8 API as far as I can tell.
Therefore, caching it globally does not seem appropriate.

(The motivation here is that this squelches warnings which are
produced by concurrency debugging tooling due to the apparent
race conditions when accessing the global variable.)

PR-URL: https://github.com/nodejs/node/pull/20971
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 11:22:31 +02:00
Lucas Liepert
b23f8ee677
test: removed message from strictEqual
By removing the message from strictEqual, it will now print out the
actual values of a and b, which will be more helpful in debugging. The
old message has been added as a comment above the test.

PR-URL: https://github.com/nodejs/node/pull/20983
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 11:19:48 +02:00
Shivang
f49bd39cde
test: improve path tests
Replaced deepStrictEqual with strictEqual when asserting that the
path is equal to the win32 or posix equivalent, since it is a more
strict check than deepStrictCheck. Also removed third argument
in the check so that if there is an assertion error the properties
that are different will be displayed.

PR-URL: https://github.com/nodejs/node/pull/20967
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 11:17:28 +02:00
Joyee Cheung
cf72301545
lib: unmask mode_t values with 0o777
This commit allows permission bits higher than 0o777 to go through
the API (e.g. `S_ISVTX`=`0o1000`, `S_ISGID`=`0o2000`,
`S_ISUID`=`0o4000`).

Also documents that these bits are not exposed through `fs.constants`
and their behaviors are platform-specific, so the users need to
use them on their own risk.

PR-URL: https://github.com/nodejs/node/pull/20975
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 11:12:10 +02:00
Davis Okoth
38c938aa90
doc: fix inconsistent documentation (host vs hostname)
Update reference to read `hostname` instead of `host` for consistency.

Also update function signature to use `hostname` rather than `host`

PR-URL: https://github.com/nodejs/node/pull/20933
Refs: https://github.com/nodejs/node/issues/20892
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-01 11:10:50 +02:00
Shailesh Shekhawat
8055bdbbc9
test: show actual error in next-tick-when-exiting
On process exit if some assertion error occurs value of
`process._exiting` was hidden, this fix will show the actual
error message with value.

PR-URL: https://github.com/nodejs/node/pull/20956
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-01 11:05:51 +02:00
starkewang
a69a29da10
net: use object destructuring
PR-URL: https://github.com/nodejs/node/pull/20959
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 11:01:45 +02:00
Anatoli Papirovski
35858bb98e
http2: force through RST_STREAM in destroy
If still needed, force through RST_STREAM in Http2Stream#destroy
calls, so that nghttp2 can wrap up properly and doesn't continue
trying to read & write data to the stream.

PR-URL: https://github.com/nodejs/node/pull/21016
Fixes: https://github.com/nodejs/node/issues/21008
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-01 10:58:26 +02:00
Anatoli Papirovski
87cd389bbf
http2: delay closing stream
Delay automatically closing the stream with setImmediate in order
to allow any pushStreams to be sent first.

PR-URL: https://github.com/nodejs/node/pull/20997
Fixes: https://github.com/nodejs/node/issues/20992
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 10:56:11 +02:00
Anatoli Papirovski
4b8ff3a424
test: fix flaky test-domain-timers
It's possible for this test to be extremely infrequently flaky if
1ms or more elapses between setting the two timeouts. In that case,
the second timer will not fire and the test will fail.

PR-URL: https://github.com/nodejs/node/pull/21019
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-06-01 10:53:59 +02:00
Anna Henningsen
7c8eec0648
test: check TTY mode reset on exit
Before PR 20592, closing all handles associated with the main
event loop would also mean that `uv_tty_reset_mode()`
can’t function properly because the corresponding FDs have
already been closed.

Add regression tests for this condition.

Refs: https://github.com/nodejs/node/issues/21020
Refs: https://github.com/nodejs/node/pull/20592

PR-URL: https://github.com/nodejs/node/pull/21027
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 10:52:06 +02:00
Anatoli Papirovski
48a2568f41
timers: add hasRef method to Timeout & Immediate
Provide a way to check whether the current timer or immediate is refed.

PR-URL: https://github.com/nodejs/node/pull/20898
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-06-01 10:29:51 +02:00
cjihrig
de732725d8
src: update postmortem constant name
This commit renames V8DBG_CLASS_SHAREDFUNCTIONINFO__RAW_NAME__OBJECT
to V8DBG_CLASS_SHAREDFUNCTIONINFO__NAME_OR_SCOPE_INFO__OBJECT
following an upstream change.

PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:59:50 +02:00
cjihrig
d6edb6cf1b
test: update postmortem metadata test
This commit updates the following postmortem metadata constants:

- v8dbg_class_SharedFunctionInfo__code__Code
  - This is now combined with SharedFunctionInfo's function_data.
  - Renamed: v8dbg_class_SharedFunctionInfo__function_data__Object
  - V8 commit: 51ded9d3c0

- v8dbg_class_SharedFunctionInfo__raw_name__Object and
- v8dbg_class_SharedFunctionInfo__scope_info__ScopeInfo
  - These are now combined as name_or_scope_info.
  - Renamed: v8dbg_class_SharedFunctionInfo__name_or_scope_info__Object
  - V8 commit: 74a663be67

- v8dbg_class_SharedFunctionInfo__compiler_hints__int
  - Renamed: v8dbg_class_SharedFunctionInfo__flags__int
  - V8 commit: 071b01b640 (diff-f3f182b0510ba2ee39ae87e421ff110b)

Fixes: https://github.com/nodejs/node-v8/issues/44
Fixes: https://github.com/nodejs/node-v8/issues/48

PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:59:47 +02:00
cjihrig
9380c1859f
test: add read_only_space heap space
v8.getHeapSpaceStatistics() now includes read_only_space
in its results. Update test-v8-stats.js to account for this.

Fixes: https://github.com/nodejs/node-v8/issues/44

PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:59:45 +02:00
Michaël Zasso
fbe6b8500f
src: fix GetCpuProfiler() deprecation warning
Refs: https://github.com/nodejs/node-v8/issues/46

PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:59:42 +02:00
Michaël Zasso
0fc488baf1
Revert "src: fix GetCpuProfiler() deprecation warning"
This reverts commit f02b74dfdb.

PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:59:40 +02:00
Michaël Zasso
3d2aebbc99
util: add type check function for BigIntObject
PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:59:37 +02:00
Timothy Gu
a60ab57c3c
deps: cherry-pick 6989b3f6d7 from V8 upstream
Original commit message:
  Fix default Intl language tag handling

  With certain ICU data bundles (such as the Node.js "small-icu"),
  %GetDefaultICULocale() may return a more specific language tag (e.g.
  "en-US") than what's available (e.g. "en"). In those cases, consider the
  more specific language tag supported.

  This CL also resolves the following Node.js issue:
     https://github.com/nodejs/node/issues/15223

  Bug: v8:7024
  Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
  Change-Id: Ifda0776b3418734d5caa8af4e50c17cda95add73
  Reviewed-on: https://chromium-review.googlesource.com/668350
  Commit-Queue: Daniel Ehrenberg <littledan@chromium.org>
  Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#52716}

PR-URL: https://github.com/nodejs/node/pull/20826
Fixes: https://github.com/nodejs/node/issues/15223
Refs: 6989b3f6d7
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-01 09:59:32 +02:00
Maya Lekova
f781758d41
deps: backport 91ddb65d from upstream V8
Original commit message:

    Revert promises optimizations due to regressions in async hooks

    Revert "[async-await] Eliminate throwaway promise in async functions."

    This reverts commit a840f1f8f7e6c9ab32dec456a954612619855093.

    Revert "[async-generators] Also avoid throwaway promise here."

    This reverts commit feb545ceba5cb477ba883b46b60142f441ad5a3d.

    Revert "[async-await] Turn await closures into intrinsics."

    This reverts commit d97bb317386506a6798386b74647cbe0502fce35.

    Revert "[async-generators] Add fast-path for primitives in AsyncGeneratorYield."

    This reverts commit e57b500eb26dc595609613963468910eb4bcae2e.

    Revert "[async-generators] Add fast-path to skip "then" lookup in AsyncGeneratorResolve."

    This reverts commit c15802e11e30976528d1b711a9b9e6ff6b490117.

    Revert "[promises] Correctly run before/after hooks for await."

    This reverts commit ca7639239fc13e992e857710cbf7dbaac87163bf.

    Bug: v8:7253, v8:7745
    Change-Id: I25ad0d2df3cfbc84dbb431aa25b268bce8a39e89
    Reviewed-on: https://chromium-review.googlesource.com/1049975
    Commit-Queue: Maya Lekova <mslekova@chromium.org>
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53139}

Refs: 91ddb65d3b
Fixes: https://github.com/nodejs/node/issues/20516
Co-authored-by: Matteo Collina <matteo.collina@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:59:19 +02:00
Anna Henningsen
109ba58b5f
deps: cherry-pick ff0a9793334 from upstream V8
Original commit message:

    [api] Expose PreviewEntries as public API

    Turn `debug::EntriesPreview` into a public API.
    This is a straightforward approach to addressing
    nodejs/node#20409
    (not relying on functionality behind `--allow-natives-syntax`)
    in Node.js.

Refs: ff0a979333

PR-URL: https://github.com/nodejs/node/pull/20719
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-01 09:59:15 +02:00
Eugene Ostroukhov
1fb0b2cb92
deps: cherry-pick 23652c5f from upstream V8
Original commit message:
    Custom tag for the traceEvents array

    This API will be used by Node.js to provide output compatible with
    Chrome devtools.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I265495f8af39bfc78d7fdbe43ac308f0920e817d
    Reviewed-on: https://chromium-review.googlesource.com/1044491
    Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53041}

PR-URL: https://github.com/nodejs/node/pull/20608
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-06-01 09:59:11 +02:00
Gus Caplan
ff06cdba1b
v8: backport 9fb02b526f1cd3b859a530a01adb08bc0d089f4f
Refs: 9fb02b526f

Original commit message:

    Allow function callbacks to have Proxy as receiver.

    R=verwaest@chromium.org

    Bug: v8:5773
    Change-Id: Ifd29a1116ee8c86b8d8d24485bbfd19e260ab66b
    Reviewed-on: chromium-review.googlesource.com/1046088
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53015}

PR-URL: https://github.com/nodejs/node/pull/20575
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-01 09:59:02 +02:00
Gus Caplan
f7cc975d4e
deps: cherry-pick 39d546a from upstream V8
Original commit message:

    [api] introduce v8::Value::IsModuleNamespaceObject

    This allows an embedder to check if a Value is a module namespace object.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Idffceff451dd5f5c6a53d4cb3ce02c1c2c5b653c
    Reviewed-on: https://chromium-review.googlesource.com/1011762
    Reviewed-by: Georg Neis <neis@chromium.org>
    Commit-Queue: Georg Neis <neis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52597}

Refs: 39d546a240

PR-URL: https://github.com/nodejs/node/pull/20016
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-01 09:58:56 +02:00
Michaël Zasso
547acf9f54
deps: update v8.gyp
Synchronize source files list with upstream's BUILD.gn.

PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:58:52 +02:00
Michaël Zasso
b8f7363284
build: reset embedder string to "-node.0"
PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:58:50 +02:00
Michaël Zasso
352a525eb9
deps: update V8 to 6.7.288.43
PR-URL: https://github.com/nodejs/node/pull/19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-06-01 09:58:27 +02:00
Tobias Nießen
faf449ca04
crypto: throw in setAuthTag on invalid length
The current implementation performs limited checks only and silently
ignores superfluous bytes of the authentication tag. This change makes
setAuthTag throw when
- the user-specified authTagLength does not match the actual tag length,
  especially when the authentication tag is longer than 16 bytes, and
  when
- the mode is GCM, no authTagLength option has been specified and the
  tag length is not a valid GCM tag length.

This change makes the conditional assignment in SetAuthTag unnecessary,
which is replaced with a CHECK.

Refs: https://github.com/nodejs/node/pull/17825

PR-URL: https://github.com/nodejs/node/pull/20040
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-01 09:52:27 +02:00
James M Snell
cb3d049bad src: refactor bootstrap to use bootstrap object
PR-URL: https://github.com/nodejs/node/pull/20917
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-05-31 14:05:53 -07:00
ohbarye
dcecfb7508 doc: fix typo in n-api.md
just replaced `than` with `that`.

- wrong: the N-API functions than can be used to change
- correct: the N-API functions that can be used to change

Fixes: https://github.com/nodejs/node/issues/21049

PR-URL: https://github.com/nodejs/node/pull/21060
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-05-31 18:59:26 +02:00
James M Snell
e60eed19be trace_events: add version metadata
Use `TRACE_EVENT_METADATA1` to include just the node.js version for
now. Later this can be expanded to include more version and platform
details.

PR-URL: https://github.com/nodejs/node/pull/20852
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-05-31 09:55:57 -07:00
Roman Reiss
0baad8f0eb
doc: better font stack for monospace in docs
There appear to be rendering issues with inconsistent glyph width when
using the Monaco font on non-macOS machines. This change updates the
native CSS font stack to use the same font stack as Boostrap does, minus
the Monaco font.

PR-URL: https://github.com/nodejs/node/pull/21036
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yazhong Liu <yorkiefixer@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-31 15:07:01 +02:00
Anna Henningsen
694ac6de5b
src: break out of timers loop if !can_call_into_js()
Otherwise, this turns into an infinite loop when the flag
is set, because it makes `MakeCallback()` return immediately.

PR-URL: https://github.com/nodejs/node/pull/20884
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-05-31 11:53:30 +02:00
Blaine Bublitz
c1012b4402
stream: ensure Stream.pipeline re-throws errors without callback
Fixes an issue where Stream.pipeline wouldn't re-throw errors
on a stream if no callback was specified, thus swallowing
said errors.

Fixes: https://github.com/nodejs/node/issues/20303

PR-URL: https://github.com/nodejs/node/pull/20437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-05-31 11:22:54 +02:00
Ben Noordhuis
c2c9c0c3d3
src: restore stdio on program exit
Record the state of the stdio file descriptors on start-up and restore
them to that state on exit.  This should prevent issues where node.js
sometimes leaves stdio in raw or non-blocking mode.

Co-authored-by: Krzysztof Taborski <taborskikrzysztof@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/20592
Fixes: https://github.com/nodejs/node/issues/14752
Fixes: https://github.com/nodejs/node/issues/21020
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-31 10:27:46 +02:00
Anna Henningsen
15c7a49bfc
http2: switch to new runtime-controlled debugging system
Remove `--debug-http2` as a compile-time feature and
make all debug statements available using `NODE_DEBUG_NATIVE=http2`
at runtime.

This probably makes the debugging-enabled case a bit slower due to
additional string concatenations, but switching to a runtime-checking
system makes debugging more flexible and can be applied more easily
to other parts of the source code as well.

PR-URL: https://github.com/nodejs/node/pull/20987
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-31 09:54:49 +02:00