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

23703 Commits

Author SHA1 Message Date
James M Snell
9d71e6a607 src: deprecate global COUNTER_* and remove perfctr
To support Performance Counters on Windows, a number of
global `COUNTER_` methods were added that are undocumented
and really only intended to be used internally by Node.js.

Unfortunately, the perfctr support apparently hasn't even
worked for quite a while and no one has even complained.

This removes the perfctr support and replaces the global
functions with deprecated non-ops for now, with the intent
of removing those outright in the next major release cycle.

PR-URL: https://github.com/nodejs/node/pull/22485
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2018-09-19 11:07:01 +02:00
Bartosz Sosnowski
6e746f1a55 doc, win: improve os.setPriority documentation
PR-URL: https://github.com/nodejs/node/pull/22817
Fixes: https://github.com/nodejs/node/issues/22799
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-19 08:02:18 +02:00
isurusiri
a1381fab8a doc: explain how to invoke gc
Currently the documentation for Wrapping C++ Objects doesn't explain
how to destruct an object by explicitly invoking the garbage collector.
This commit includes a modification to docs that explains how to force
the garbage collector to clear objects using V8's command line flags.

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

PR-URL: https://github.com/nodejs/node/pull/20431
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2018-09-18 22:58:01 -07:00
Anna Henningsen
e6d0ced7bb worker: only stop inspector if started
This may fix some flakiness with tests that use `worker.terminate()`.
In particular, the following failure seems like it could be related
(no consistent reproduction available, though):

```
15:30:14 not ok 187 parallel/test-heapdump-worker
15:30:14   ---
15:30:14   duration_ms: 2.499
15:30:14   severity: fail
15:30:14   exitcode: 134
15:30:14   stack: |-
15:30:14     npm[6904]: src\inspector_agent.cc:729: Assertion `(client_) != nullptr' failed.
```

From https://ci.nodejs.org/job/node-test-binary-windows/20041/COMPILED_BY=vs2017,RUNNER=win2016,RUN_SUBSET=2/console

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

PR-URL: https://github.com/nodejs/node/pull/22927
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
2018-09-18 21:26:46 -07:00
Gus Caplan
a7b59d6204
src: flip Atomics.notify alias
PR-URL: https://github.com/nodejs/node/pull/22844
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
2018-09-18 17:10:40 -05:00
Rich Trott
8d7aa2167f tools: synchronize deepStrictEqual() message rules
Update ESLint config to include a rule about assert.deepStrictEqual()
messages and string literals. The rule is included in lib and test, but
should be included everywhere else as well.

PR-URL: https://github.com/nodejs/node/pull/22887
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-09-18 12:34:28 -07:00
Eugene Ostroukhov
f28c6f7eef inspector: workers debugging
Introduce a NodeTarget inspector domain modelled after ChromeDevTools
Target domain. It notifies inspector frontend attached to a main V8
isolate when workers are starting and allows passing messages to
inspectors on their isolates. All inspector functionality is enabled on
worker isolates.

PR-URL: https://github.com/nodejs/node/pull/21364
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-18 09:01:33 -07:00
MaleDong
ba0b4e43e4
lib,doc: remove unused parameter, improve docs
1) Remove 'callback' in 'check' function, because we don't check or use
that directly.

2) Make 'digest' clearer in the documentation.

PR-URL: https://github.com/nodejs/node/pull/22858
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-18 16:06:32 +02:00
Anna Henningsen
8989c76c6e
Revert "src: implement query callbacks for vm"
This reverts commit 85c356c10e
from PR https://github.com/nodejs/node/pull/22390.

See the discussion in the (proposed) fix at
https://github.com/nodejs/node/pull/22836.

Refs: https://github.com/nodejs/node/pull/22836
Refs: https://github.com/nodejs/node/pull/22390
Fixes: https://github.com/nodejs/node/issues/22723

PR-URL: https://github.com/nodejs/node/pull/22911
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-18 15:48:02 +02:00
Anto Aravinth
dcc0c2c5c9
lib: move process.binding('js_stream') to internalBinding
PR-URL: https://github.com/nodejs/node/pull/22239
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-18 13:29:55 +02:00
Ruben Bridgewater
9ccf5c8954
test: don't inspect values if not necessary
The inspection triggered on each assert call eagerly even tough the
assertion was never triggered. That caused significant CPU overhead.

PR-URL: https://github.com/nodejs/node/pull/22903
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-09-18 13:12:34 +02:00
Tobias Nießen
a9e7369b11
crypto: fix edge case in authenticated encryption
Restricting the authentication tag length and calling update or
setAAD before setAuthTag caused an incorrect authentication tag to
be passed to OpenSSL: The auth_tag_len_ field was already set, so
the implementation assumed that the tag itself was known as well.

PR-URL: https://github.com/nodejs/node/pull/22828
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-09-18 12:55:07 +02:00
Tobias Nießen
47a0d041d1
crypto: remove unused scrypt validation parameter
PR-URL: https://github.com/nodejs/node/pull/22902
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-09-18 11:26:36 +02:00
Yang Guo
dafaa6ecb5 deps: add missing HandleScope in FieldType::PrintTo
Refs: https://github.com/nodejs/node/issues/22775

PR-URL: https://github.com/nodejs/node/pull/22890
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-18 10:18:31 +02:00
Christopher Hiller
fee4d3ab90 tools: merge custom cpplint with cpplint v1.3.0
Merged https://github.com/cpplint/cpplint/blob/master/cpplint.py with
our customized version to enable better IDE/editor integration.

Made file executable.

PR-URL: https://github.com/nodejs/node/pull/22864
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-09-18 07:56:56 +02:00
Kyle Farnung
988be43e33 tools,win: fix find_python error
On a machine without `python.exe` in the PATH the script was failing
with:

```console
> .\vcbuild.bat
Looking for Python 2.x
2> was unexpected at this time.
```

Escaping the `>` seems to resolve it.

PR-URL: https://github.com/nodejs/node/pull/22797
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-17 16:50:47 -07:00
Christopher Hiller
8df13ec33d
doc: add boneskull as collaborator
PR-URL: https://github.com/nodejs/node/pull/22917
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-09-17 14:45:53 -07:00
Joyee Cheung
bb9d788f77
build: do not lint fixtures in make lint-md
PR-URL: https://github.com/nodejs/node/pull/22549
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-17 14:48:28 -04:00
Joyee Cheung
e692a09802
errors: add useOriginalName to internal/errors
This allows us to tell the type of the errors without using
instanceof, which is necessary in WPT harness.

PR-URL: https://github.com/nodejs/node/pull/22556
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-17 14:42:00 -04:00
Eugene Ostroukhov
ab5f789e3f inspector: enable Inspector JS API in workers
PR-URL: https://github.com/nodejs/node/pull/22769
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-17 09:49:53 -07:00
Kamat, Trivikram
ab35194cb0
doc: update 6.x to 8.x in backporting wiki
PR-URL: https://github.com/nodejs/node/pull/22879
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-17 17:51:20 +02:00
Benjamin Chen
e2325bcc04
string_decoder: support typed array or data view
Refs: https://github.com/nodejs/node/issues/1826
PR-URL: https://github.com/nodejs/node/pull/22562
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-17 17:48:44 +02:00
Denys Otrishko
1b92214d09
module: fix inconsistency between load and _findPath
Files with multiple extensions are not handled by require-module system
therefore if you have file 'file.foo.bar' and require('./file') it won't
be found even while using require.extensions['foo.bar'] but before this
commit if you have require.extensions['foo.bar'] and
require.extensions['bar'] set then the latter will be called if you do
require('./file') but if you remove the former the former ('foo.bar')
property it will fail.
This commit makes it always fail in such cases.

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

PR-URL: https://github.com/nodejs/node/pull/22382
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-17 17:41:42 +02:00
Jon Moss
3c2aa4b9f3
tls: de-duplicate for TLSSocket methods
Similar approach is used for `TLSWrap`, where C++ handle methods are
mapped one-to-one in JS.

PR-URL: https://github.com/nodejs/node/pull/22142
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-17 17:34:19 +02:00
Yihong Wang
29cf335e6a
build: skip cctest on Windows shared lib build
cctest depends on some internal APIs which don't declare
`__declspec(dllexport)` and causes build failure when building
node as shared lib on Windows. Since we already have good test
coverage in static lib, we decide to skip the cctest in shared
lib build on Windows.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

PR-URL: https://github.com/nodejs/node/pull/21228
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-17 17:31:40 +02:00
Anna Henningsen
4286dcf17f
src: refactor Environment::GetCurrent() usage
Make `Environment::GetCurrent()` return `nullptr` if the current
`Context` is not a Node.js context, and for the relevant usage of
this function, either:

- Switch to the better `GetCurrent(args)` variant
- Turn functions in to no-ops where it makes sense
- Make it a `CHECK`, i.e. an API requirement, where it make sense
- Leave a `TODO` comment for verifying what, if anything, is to be done

PR-URL: https://github.com/nodejs/node/pull/22819
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-17 17:20:27 +02:00
Anna Henningsen
c33e27dc3c
doc: improve asymmetric crypto docs
Refs: https://github.com/nodejs/node/issues/22792

PR-URL: https://github.com/nodejs/node/pull/22820
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-17 17:15:14 +02:00
James M Snell
932be0164f
util: make TextEncoder/TextDecoder global
Fixes: https://github.com/nodejs/node/issues/20365

PR-URL: https://github.com/nodejs/node/pull/22281
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-09-17 17:09:25 +02:00
James M Snell
efe0bbcd2f
http2: add http2stream.endAfterHeaders property
Indicates is the END_STREAM flag was set on the received HEADERS frame

PR-URL: https://github.com/nodejs/node/pull/22843
Fixes: https://github.com/nodejs/node/issues/22497
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-17 16:57:23 +02:00
Ruben Bridgewater
eee5adfab5
assert: add default operator to assert.fail()
This makes sure `assert.fail()` contains an operator instead of being
undefined.

On top of that it also fixes the `err.generatedMessage` property.
Before, it was not always set correct.

PR-URL: https://github.com/nodejs/node/pull/22694
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-09-17 15:59:12 +02:00
Mohit kumar Bajoria
cb3d6d5113
doc: add missing options for crypto sign.sign()
Fixes: https://github.com/nodejs/node/issues/22813

PR-URL: https://github.com/nodejs/node/pull/22824
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-09-17 14:49:20 +02:00
Daniel Bevenius
1747d707d7 src: move no_async_hooks_checks to env
This commit moves the setting of AsyncHooks no_force_checks to the
Environment constructor instead of from the Start function in node.cc.

PR-URL: https://github.com/nodejs/node/pull/22784
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-17 07:45:52 +02:00
Rich Trott
b7661a8311 tools: prevent string literals in some assertions
String literals provided as the third argument to assert.strictEqual()
or assert.deepStrictEqual() will mask the values that are causing
issues. Use a lint rule to prevent such usage.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:42 -07:00
Rich Trott
9c6e23d10f test: prepare test-assert for strictEqual linting
Make minor modifications to test-assert.js to prepare it for linting
rule that forbids the use of string literals for the third argument of
assert.strictEqual().

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:41 -07:00
Rich Trott
d12e2f6fcf test: remove string literal from assertion
Remove string literal as assertion message in call to
assert.strictEqual() in test-dns-lookup.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:39 -07:00
Rich Trott
2a5e0eb995 test: remove string literal from assertion
Remove string literal as assertion message in call to
assert.strictEqual() in test-dns-resolveany-bad-ancount.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:38 -07:00
Rich Trott
cc58e5546c test: remove string literal arg from assertion
Remove unnecessary string literal from assert.deepStrictEqual() call.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:36 -07:00
Rich Trott
8eb1130854 test: remove string literal message from assertion
Remove string literal from assert.strictEqual message to improve output
of AssertionError.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:34 -07:00
Rich Trott
141daf10c8 test: remove string literal from assertion
Remove string literal from `assert.strictEqual()` call `message`
parameter and make it a comment above the assertion instead.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:33 -07:00
Rich Trott
d369ef05c8 test: refactor flag check
Refactor test-vm-run-in-new-context so that check for `--expose-gc` flag
will not run afoul of an upcoming lint rule that checks that string
literals are not used for the `message` argument of
`assert.strictEqual()`.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:31 -07:00
Rich Trott
ff66132339 test: simplify assertion in http2 tests
In test-http2-timeout-large-write.js and
test-http2-timeout-large-write-file.js:

Use assert.ok() on a boolean that the test itself creates and sets,
rather than assert.strictEqual(). This allows us to use a static message
without running afoul of the upcoming "do not use string literals with
assert.strictEqual()" lint rule.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:30 -07:00
Rich Trott
bb898ca39d test: improve assertion in test-inspector.js
Remove an unecessary string literal from assert.strictEqual() call in
test-inspector.js. The string literal is printed instead of the value
that causes an error. Removing the string literal allows the value that
caused the error to be printed. This improves the troubleshooting
experience when the test fails due to that assertion.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:28 -07:00
Rich Trott
2b5320130b test: remove string literal message in assertions
Remove string literal message in assert.strictEqual() calls in
test-async-await.js.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:27 -07:00
Rich Trott
86456bacd8 test: remove string literal message from assertion
Remove string literal message in assert.strictEqual() call in napi test
testFinalizer.js.

PR-URL: https://github.com/nodejs/node/pull/22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-09-16 20:37:25 -07:00
Rich Trott
ece642937b tools: update ESLint to 5.6.0
Update ESLint to 5.6.0.

PR-URL: https://github.com/nodejs/node/pull/22882
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-16 10:21:57 -07:00
William Chargin
aecfea4c44
path: remove unnecessary if statement
There is an `if`-statement in `normalizeString` (a helper function for
`path.normalize`) whose `else`-branch is never taken. This patch
removes it.

PR-URL: https://github.com/nodejs/node/pull/22273
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-16 10:00:36 +02:00
Anna Henningsen
80076cb1c7
tracing: remove shutdown-on-signal
This feature cannot be reasonably implemented this way
without inherently being susceptible to race conditions
that lead to hangs, crashes, etc.

What’s more, implementing this for some signals only
(and it can only be implemented for some signals at all)
may lead to the impression that it is a guaranteed
feature, when really consumers of the tracing output
*need* to be able to handle abrupt ends meaningfully.

Fixes: https://github.com/nodejs/node/issues/14802
Fixes: https://github.com/nodejs/node/issues/22528

PR-URL: https://github.com/nodejs/node/pull/22734
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-09-16 09:51:00 +02:00
Anna Henningsen
23f8b02513
src: fix --prof-process CLI argument handling
Make sure that options after `--prof-process` are not treated
as Node.js options.

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

PR-URL: https://github.com/nodejs/node/pull/22790
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-16 09:44:37 +02:00
Anto Aravinth
9c9c01f183
child_process: move process.binding('spawn_sync') to internalBinding
PR-URL: https://github.com/nodejs/node/pull/22260
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-15 13:48:44 +02:00
chocolateboy
dadd6e1688
util: use a shared symbol for util.inspect.custom
Define `util.inspect.custom` as
`Symbol.for("nodejs.util.inspect.custom")` rather than
`Symbol("util.inspect.custom")`. This allows `inspect` hooks to
easily/safely be defined in non-Node.js environments.

Fixes: https://github.com/nodejs/node/issues/20821
Refs: https://github.com/nodejs/node/pull/22684

PR-URL: https://github.com/nodejs/node/pull/20857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
2018-09-15 13:15:15 +02:00