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: https://github.com/v8/v8/commit/51ded9d3c0dc430217253595027c6ed207d8cc2d
- 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: https://github.com/v8/v8/commit/74a663be675924944a343f2aed71bbe60ef55764
- v8dbg_class_SharedFunctionInfo__compiler_hints__int
- Renamed: v8dbg_class_SharedFunctionInfo__flags__int
- V8 commit: https://github.com/v8/v8/commit/071b01b6406e8884b040cc54e763d4c3b4b18c39#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: https://github.com/v8/v8/commit/6989b3f6d7d6a5e68127332296723317917821eb
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 and Matteo Collina
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: https://github.com/v8/v8/commit/91ddb65d3b34c07c5026727de84dc91b5e0a43cd
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: https://github.com/v8/v8/commit/ff0a979333408f544f081489411814b84df6e2d9
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: https://github.com/v8/v8/commit/9fb02b526f1cd3b859a530a01adb08bc0d089f4f
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: https://github.com/v8/v8/commit/39d546a24022b62b00aedf7b556ac6c9e2306aab
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 and Krzysztof Taborski
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
Anna Henningsen
bd85844c4e
src: implement debug output utilities
...
Implement utilities for easier debugging of Node.js core code,
inspired by the HTTP/2 debugging code. Debugging is, however,
implemented at runtime rather than at compile time, controlled
through a new `NODE_DEBUG_NATIVE=categories` environment variable.
The runtime overhead in the debugging-disabled case amounts to
1 well-cachable one-byte read per debug call.
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:48 +02:00
Rich Trott
eadcee1137
tls: throw if SNICallback is not a function
...
If a value is passed for SNICallback and it is not a function,
createServer() will now throw.
PR-URL: https://github.com/nodejs/node/pull/20969
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-31 09:35:07 +02:00
Rich Trott
89d211f54a
doc: make minor improvements to fs.realpath() docs
...
Make canonical vs. unique text more precise and eliminate quotation
marks. Remove repeated text from fs.realpathSync(), linking to
fs.realpath() instead.
PR-URL: https://github.com/nodejs/node/pull/20953
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-31 01:48:27 +02:00
Gus Caplan
a25730bda3
util: fix inspection of module namespaces
...
PR-URL: https://github.com/nodejs/node/pull/20962
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-30 17:08:23 -03:00
Matheus Marchini
6d5847917c
test: mark test-fs-readfile-tostring-fail as flaky
...
test-fs-readfile-tostring-fail is failing frequently on OSX machines.
There's a PR to fix this issue in libuv, but while the fix don't land on
Node.js this test should be marked as flaky.
Ref: https://github.com/nodejs/node/issues/16601
Ref: https://github.com/libuv/libuv/pull/1742
PR-URL: https://github.com/nodejs/node/pull/21013
Refs: https://github.com/nodejs/node/issues/16601
Refs: https://github.com/libuv/libuv/pull/1742
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-05-30 14:42:58 -03:00
Masashi Hirano
e5a3579a50
test: increase coverage for fs.promises.truncate
...
To increase test coverage, added tests for fs.promises.truncate
and FileHandle.truncate.
PR-URL: https://github.com/nodejs/node/pull/20638
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-30 19:08:42 +02:00
Masashi Hirano
6558dcbf75
test: add test for fs.promises.lchmod
...
To increase test coverage for fs.promises by adding a test for
lchmod.
PR-URL: https://github.com/nodejs/node/pull/20584
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-05-30 19:01:48 +02:00
Unknown
2cd3e61b2f
fs: ensure options.flag defaults to 'r' in readFile
...
When passing {} or { encoding: 'utf8' } as options to readFile, the
flag is not defaulted to 'r' unlike normal fs. This fix makes
fs.promises.readFile() act consistent with fs.readFile().
It also fixes another issue with fs.promises.readfile() where it
returned a Buffer instead of an empty string when encoding is provided.
PR-URL: https://github.com/nodejs/node/pull/20268
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-30 18:41:19 +02:00
Matheus Marchini
72ccafdd10
test: mark test-child-process-fork-net as flaky
...
`flaky-test-child-process-fork-net` has been failing constantly for the
past few days, and all solutions suggestes so far were didn't work.
Marking it as faky while the issue is not fixed.
Ref: https://github.com/nodejs/node/pull/21012
Ref: https://github.com/nodejs/node/pull/20973
Ref: https://github.com/nodejs/node/pull/20973
PR-URL: https://github.com/nodejs/node/pull/21018
Refs: https://github.com/nodejs/node/pull/21012
Refs: https://github.com/nodejs/node/pull/20973
Refs: https://github.com/nodejs/node/pull/20973
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-05-30 10:38:58 -03:00
Ben Noordhuis
bea6238136
src: remove unused private data member
...
PR-URL: https://github.com/nodejs/node/pull/20974
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-05-30 15:00:11 +02:00
Myles Borins
8976c79b6f
doc: add missing link for 10.3.0 changelog
...
PR-URL: https://github.com/nodejs/node/pull/21017
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-05-30 11:22:51 +02:00