Ruben Bridgewater
12ed7c94e5
util: improve inspect performance
...
This significantly improves the inspection performance for all array
types. From now on only the visible elements cause work instead of
having to process all array keys no matter how many entries are
visible.
This also moves some code out of the main function to reduce the
overall function complexity.
PR-URL: https://github.com/nodejs/node/pull/22503
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-09-07 19:58:36 +02:00
Ruben Bridgewater
de33a5aa6e
benchmark: refactor util benchmarks
...
This significantly reduces the benchmark runtime. It removes to many
variations that do not provide any benefit and reduces the iterations.
PR-URL: https://github.com/nodejs/node/pull/22503
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-09-07 19:58:36 +02:00
Weijia Wang
e917a23d2e
url: move process.binding('url') to internalBinding
...
PR-URL: https://github.com/nodejs/node/pull/22204
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-09-07 09:03:25 +08:00
Anna Henningsen
0c30d0e4e0
zlib: fix memory leak for invalid input
...
Don’t toggle the weak/strong reference flag from the error
handler, that’s too confusing. Instead, always do it in the
code that handles the write call.
Fixes: https://github.com/nodejs/node/issues/22705
PR-URL: https://github.com/nodejs/node/pull/22713
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-06 10:54:37 +02:00
cjihrig
7e4b0a4850
util: make util binding internal
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22675
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-09-05 21:53:11 -04:00
Tessei Kameyama
af883e1f99
child_process: fix switches for alternative shells on Windows
...
On Windows, normalizeSpawnArguments set "/d /s /c" for any shells.
It cause exec and other methods are limited to cmd.exe as a shell.
Powershell and git-bash are often used instead of cmd.exe,
and they can recieve "-c" switch like unix shells.
So normalizeSpawnArguments is changed to set "/d /s /c" for cmd.exe,
and "-c" for others.
Fixes: https://github.com/nodejs/node/issues/21905
PR-URL: https://github.com/nodejs/node/pull/21943
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: João Reis <reis@janeasystems.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-09-05 20:52:02 +01:00
Ruben Bridgewater
3209679b7f
util: add util.types.isBoxedPrimitive
...
Checking all boxed primitives individually requires to cross the C++
barrier multiple times besides being more complicated than just a
single check.
PR-URL: https://github.com/nodejs/node/pull/22620
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-05 20:53:59 +02:00
Benjamin Coe
c9d6e3ff04
coverage: expose native V8 coverage
...
native V8 coverage reports can now be written to disk by setting the
variable NODE_V8_COVERAGE=dir
PR-URL: https://github.com/nodejs/node/pull/22527
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-09-05 10:26:48 -07:00
Michaël Zasso
594a84d8f2
src: remove calls to deprecated V8 functions (Int32Value)
...
Remove all calls to deprecated V8 functions (here: Value::Int32Value)
inside the code.
PR-URL: https://github.com/nodejs/node/pull/22662
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-09-05 12:59:25 +02:00
Szymon Marczak
d6a43438d6
http2: don't expose the original socket through the socket proxy
...
Refs: https://github.com/nodejs/node/pull/22486
PR-URL: https://github.com/nodejs/node/pull/22650
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-05 12:58:40 +02:00
Anna Henningsen
d4cdb2ce66
test: refactor test-gc-tls-external-memory
...
- Don’t use network connections, we don’t need them and
they add more native objects into the mix when we care
about other kinds of native objects.
- Run GC only once every 64 iterations – this cuts down
running time from 4 s to 400 ms.
- Use `common.mustCall()` for the `connect()` handler.
- Make sure that the TLS sockets do get garbage collected,
since the test would otherwise also pass if they remain
alive indefinitely.
PR-URL: https://github.com/nodejs/node/pull/22651
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-05 12:44:42 +02:00
Anna Henningsen
b3eb3a19ad
test: fix flaky test-worker-message-port-transfer-self
...
Look at the status of the `MessagePort` rather than
relying on a timeout.
PR-URL: https://github.com/nodejs/node/pull/22658
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-05 12:03:52 +02:00
Ruben Bridgewater
be5e3964b3
assert: fix loose set and map comparison
...
The fast path did not anticipate different ways to express a loose
equal string value (e.g., 1n == '+0001'). This is now fixed with the
downside that all primitives that could theoretically have equal
entries must go through a full comparison.
Only some strings, symbols, undefined, null and NaN can be detected
in a fast path as those entries have a strictly limited set of
possible equal entries.
PR-URL: https://github.com/nodejs/node/pull/22495
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-09-05 01:49:22 +02:00
Masashi Hirano
fdf829eea4
test: check parameter type of fs.mkdir()
...
Added tests to check parameter type of fs.mkdir(), fs.mkdirSync()
and fsPromises.mkdir() to increase coverage.
PR-URL: https://github.com/nodejs/node/pull/22616
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-09-04 17:58:32 +01:00
guybedford
eef072fa08
url: provide pathToFileURL and fileURLToPath
...
PR-URL: https://github.com/nodejs/node/pull/22506
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-09-04 16:08:21 +02:00
Ali Ijaz Sheikh
8e91215307
test: add test to dynamic enablement of trace-events
...
PR-URL: https://github.com/nodejs/node/pull/22114
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-04 14:26:51 +02:00
Anna Henningsen
71f633a32f
src: allow UTF-16 in generic StringBytes decode call
...
This allows removing a number of special cases in other
parts of the code, at least one of which was incorrect
in expecting aligned input when that was not guaranteed.
Fixes: https://github.com/nodejs/node/issues/22358
PR-URL: https://github.com/nodejs/node/pull/22622
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-09-03 22:33:42 +02:00
Anna Henningsen
f42323109a
test: improve assertion in process test
...
PR-URL: https://github.com/nodejs/node/pull/22634
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-09-03 22:15:48 +02:00
Anna Henningsen
ba43bce9e2
test: fix flaky parallel/test-fs-write-file-typedarrays
...
Using the same filename for different async tests could lead
to race conditions.
Example failure: https://travis-ci.com/nodejs/node/jobs/143351655
Refs: https://github.com/nodejs/node/pull/22150
PR-URL: https://github.com/nodejs/node/pull/22659
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-09-03 14:22:42 +02:00
Anna Henningsen
c100d400bd
src: disable debug options when inspector is unavailable
...
This fixes `parallel/test-cli-node-print-help` when Node.js
is compiled without the inspector.
PR-URL: https://github.com/nodejs/node/pull/22657
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-09-03 01:39:20 +02:00
Tobias Nießen
761bbfbd76
crypto: fix incorrect use of INT_MAX in validation
...
The native crypto module doesn't export INT_MAX, so all occurrences
in the JavaScript layer evaluated to undefined. This change removes
all such occurrences and replaces validateInt32 with validateUint32
since the native layer assumes uint32_t anyway.
The alternative would be to use the constant from the constants
module, but that would be pointless as far as I can tell.
PR-URL: https://github.com/nodejs/node/pull/22581
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-02 14:11:54 +02:00
Tobias Nießen
b4026099c3
crypto: improve setAuthTag
...
This is an attempt to make the behavior of setAuthTag match the
documentation: In GCM mode, it can be called at any time before
invoking final, even after the last call to update.
Fixes: https://github.com/nodejs/node/issues/22421
PR-URL: https://github.com/nodejs/node/pull/22538
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-09-02 13:56:25 +02:00
Anna Henningsen
208022cb31
test: improve assertions in test-cli-node-print-help
...
PR-URL: https://github.com/nodejs/node/pull/22489
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-09-02 13:48:00 +02:00
Yaniv Friedensohn
4a0466f23a
net: throw error if port/path does not exist in options
...
Throw error ERR_INVALID_ARG_VALUE if the port and path properties
do not exist in the options object argument when calling
server.listen().
Refs: https://github.com/nodejs/node/issues/16712
PR-URL: https://github.com/nodejs/node/pull/22085
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-09-02 13:20:01 +02:00
Mathias Buus
1287e524ee
src: fix external memory usage going negative
...
PR-URL: https://github.com/nodejs/node/pull/22594
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: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-09-02 12:48:35 +02:00
Anna Henningsen
c8880ea276
cli: generate --help text in JS
...
Instead of having a custom, static, hand-written string
that is being printed to stdout when `--help` is present,
generate it in JS when requested.
PR-URL: https://github.com/nodejs/node/pull/22490
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-09-01 00:13:23 +02:00
Rich Trott
f86d0ebc36
tools: specify rule disabled in test-assert.js
...
Instead of disabling all ESLint rules on two lines in test-assert.js,
specify the rule that needs to be disabled.
PR-URL: https://github.com/nodejs/node/pull/22563
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-31 19:17:31 +02:00
Joyee Cheung
a58b8dd545
test: move test that depends on dns query to internet
...
These test cases in `test/parallel/test-dns-lookup.js` send
dns requests and depend on the results, which could fail
if the DNS service for invalid hosts is hijacked by the ISP.
PR-URL: https://github.com/nodejs/node/pull/22516
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-31 19:10:17 +02:00
Denys Otrishko
22789fd6d0
child_process: fix handling of incorrect uid/gid in spawn
...
uid/gid must be uint32, which is asserted on a c++ side but wasn't
checked on a JS side and therefore resulted in a process crash.
Refs: https://github.com/nodejs/node/issues/22570
PR-URL: https://github.com/nodejs/node/pull/22574
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-31 19:02:26 +02:00
cjihrig
c8950cdabc
dgram: make process.binding('udp_wrap') internal
...
PR-URL: https://github.com/nodejs/node/pull/22475
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-08-31 09:27:44 -04:00
Rich Trott
8e189794df
test: remove skip of OS X bug
...
Three tests are skipped because of Applie bug 17894467. That bug exists
in OS X 10.10, but we no longer support 10.10 (and neither does Apple).
Remove the test-skipping.
PR-URL: https://github.com/nodejs/node/pull/22546
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-30 22:56:01 -07:00
Rich Trott
366ffdcf29
test: fix typo in test name
...
Correct test name to reflect the module it tests (`trace_events`).
PR-URL: https://github.com/nodejs/node/pull/22605
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-30 13:29:43 -07:00
Tobias Nießen
221df2286d
crypto: deprecate aliases for randomBytes
...
PR-URL: https://github.com/nodejs/node/pull/22519
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-30 17:19:51 +02:00
cjihrig
8b0c482647
dns: make process.binding('cares_wrap') internal
...
PR-URL: https://github.com/nodejs/node/pull/22474
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-30 09:08:44 -04:00
Refael Ackermann
8569f4a417
test: refacor spawn[Sync]Pwd
...
* extract the gist into common.pwdCommand
* Merge test-child-process-buffering.js into test-child-process-stdio.js
PR-URL: https://github.com/nodejs/node/pull/22522
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-29 17:32:13 -04:00
cjihrig
6a689c8aa3
lib: make pipe_wrap binding internal
...
PR-URL: https://github.com/nodejs/node/pull/22482
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-29 15:11:59 -04:00
cjihrig
df073cdda4
tty: make process.binding('tty_wrap') internal
...
PR-URL: https://github.com/nodejs/node/pull/22477
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-08-29 12:28:51 -04:00
Ujjwal Sharma
1abbe0a212
vm: add bindings for v8::CompileFunctionInContext
...
Adds a method compileFunction to the vm module, which serves as a
binding for v8::CompileFunctionInContext with appropriate args for
specifying the details, and provide params for the wrapper.
Eventually, we would be changing Module._compile to use this internally
over the standard Module.wrap
PR-URL: https://github.com/nodejs/node/pull/21571
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-29 16:41:01 +02:00
Lucas Woo
dca2f9849c
test: properly extend process.env in child_process
...
PR-URL: https://github.com/nodejs/node/pull/22430
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-28 18:17:41 +01:00
cjihrig
56cf058878
child_process: make process_wrap binding internal
...
PR-URL: https://github.com/nodejs/node/pull/22479
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-27 17:49:01 -04:00
Sarat Addepalli
68dff4a67b
child_process: allow typed arrays for input
...
doc: Update child_process docs, stating typed arrays are allowed.
error: Update error message for `ERR_INVALID_SYNC_FORK_INPUT`
lib: Use isArrayBufferView instead of isUint8Array
test: Update test-child-process-spawnsync-input to test for all
typed arrays and data view.
PR-URL: https://github.com/nodejs/node/pull/22409
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-27 23:40:10 +02:00
Scott Van Gilder
31b3273eaa
test: remove string literal from strictEqual()
...
Remove 3rd argument from assert.deepStrictEqual() in
test/parallel/test-stream2-writable.js to allow for debugging to work
properly.
PR-URL: https://github.com/nodejs/node/pull/22512
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: George Adams <george.adams@uk.ibm.com >
2018-08-27 14:20:59 +01:00
James M Snell
dd03706d62
http2: throw better error when accessing unbound socket proxy
...
Fixes: https://github.com/nodejs/node/issues/22268
PR-URL: https://github.com/nodejs/node/pull/22486
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-27 02:17:02 -07:00
Ruben Bridgewater
ccb303e037
repl: improve error output
...
1) Currently extra properties on an error will be ignored, if thrown.
This information will from now on be visible.
2) In case someone threw a non error object it would have resulted in
`[object Object]`. Instead, the full object will now be visible.
3) Some cases were not detected properly as error before and "Thrown: "
was visible before. That is now fixed.
PR-URL: https://github.com/nodejs/node/pull/22436
Refs: https://github.com/nodejs/node/issues/20253
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-27 14:08:43 +02:00
Tobias Nießen
50aa85dc9b
crypto: deprecate _toBuf
...
PR-URL: https://github.com/nodejs/node/pull/22501
Fixes: https://github.com/nodejs/node/issues/22425
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2018-08-27 13:37:20 +02:00
Daniel Bevenius
da8641f3b4
src: move process.binding('async_wrap') internal
...
This commit makes the async_wrap builtin an internal builtin, and
changes usage of the builtin from using process.binding('async_wrap')
to use internalBinding instead.
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/22469
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-27 05:42:55 +02:00
Anna Henningsen
1c05b16c9e
src: fix NODE_OPTIONS parsing bug
...
I, uhm, might have messed up by using a `substr(start, end)`
signature when `std::string` actually uses `substr(start, len)`.
Fix that.
Fixes: https://github.com/nodejs/node/issues/22526
Refs: https://github.com/nodejs/node/pull/22392
PR-URL: https://github.com/nodejs/node/pull/22529
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-26 13:52:14 +02:00
Christopher Hiller
80143f616d
process: add allowedNodeEnvironmentFlags property
...
`process.allowedNodeEnvironmentFlags` provides an API to validate and
list flags as specified in `NODE_OPTIONS` from user code.
Refs: https://github.com/nodejs/node/issues/17740
Signed-off-by: Christopher Hiller <boneskull@boneskull.com >
PR-URL: https://github.com/nodejs/node/pull/19335
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-24 18:15:19 -07:00
Joyee Cheung
6dd694c125
test: move custom WHATWG URL tests into separate files
...
To enable automatic update of WPT, move all our custom
WHATWG URL tests that are not present in the upstream into
files starting with `test-whatwg-url-custom-`, so it's easier
to identify test cases that can be upstreamed and test cases
that should be rolled into our repo (possibly with automation).
PR-URL: https://github.com/nodejs/node/pull/22442
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2018-08-25 08:57:23 +08:00
Neeraj Laad
376cc4d0b7
test: remove third argument from strictEqual()
...
test: remove third argument from assert.strictEqual()
PR-URL: https://github.com/nodejs/node/pull/22451
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-24 12:01:21 -07:00