Benjamin Gruenbaum
484bfa2e37
crypto: accept decimal Number in randomBytes
...
This change adds the ability to pass a double into randomBytes.
PR-URL: https://github.com/nodejs/node/pull/15130
Fixes: https://github.com/nodejs/node/issues/15118
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-04 10:09:14 +03:00
Anatoli Papirovski
8d5b0130da
http2: correct emit error in onConnect, full tests
...
Correct requestOnConnect to emit session error on
NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE rather than stream error. Add full
test suite for the error handling within requestOnConnect.
PR-URL: https://github.com/nodejs/node/pull/15080
Refs: https://github.com/nodejs/node/issues/14985
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-03 20:32:56 -03:00
Anatoli Papirovski
e289540e12
http2: adjust error types, test coverage
...
Change error types emitted from request and validatePriorityOptions
to be TypeError rather than the incorrect RangeError. Add tests
to confirm that all errors are thrown as expected (weight, parent,
exclusive, silent, endStream and getTrailers). Add test for method
CONNECT throwing error on missing :authority or superfluous :scheme
and :path.
PR-URL: https://github.com/nodejs/node/pull/15109
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-03 20:31:11 -03:00
Anatoli Papirovski
198fcb9c62
test: increase Http2ServerResponse test coverage
...
Modify existing header tests for Http2ServerResponse to include
sendDate (get and set) and headersSent. Expand existing test
for end to include a check for closed. Add a new test for destroy.
PR-URL: https://github.com/nodejs/node/pull/15074
Refs: https://github.com/nodejs/node/issues/14985
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-03 20:18:49 -03:00
Refael Ackermann
233d1e276a
test,process: run 'abort' suite on Windows
...
PR-URL: https://github.com/nodejs/node/pull/15056
Fixes: https://github.com/nodejs/node/issues/14012
Refs: https://github.com/nodejs/node/pull/14013
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-09-03 17:20:20 -04:00
Refael Ackermann
98d8db3299
tools: bump vswhere helper to 2.0.0
...
* enable explicit detection of prerelease VS versions with
`set VSWHERE_WITH_PRERELEASE=1`
PR-URL: https://github.com/nodejs/node/pull/14557
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com >
2017-09-03 17:15:27 -04:00
Gibson Fahnestock
180f86507d
test: remove envPlus, use Object.assign everywhere
...
PR-URL: https://github.com/nodejs/node/pull/14845
Fixes: https://github.com/nodejs/node/issues/14823
Refs: https://github.com/nodejs/node/pull/14822
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-09-03 17:28:50 -03:00
Cyril Lakech
ed084a035c
url: remove unused code from autoEscapeStr
...
PR-URL: https://github.com/nodejs/node/pull/15086
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-03 17:26:18 -03:00
Joyee Cheung
c419adff1d
net: check EADDRINUSE after binding localPort
...
PR-URL: https://github.com/nodejs/node/pull/15097
Fixes: https://github.com/nodejs/node/issues/15084
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-09-03 17:19:35 -03:00
Rich Trott
d7200d6823
test: fix flaky test-readline-interface
...
Move test reliant on timer triggering in a timely fahion from parallel
to sequential. The test can fail under high load when the timer is
triggered too late and the `\r` and `\n` are treated as separate lines.
PR-URL: https://github.com/nodejs/node/pull/15066
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-03 17:12:56 -03:00
Daniel Bevenius
c7c9e20ed0
src: fix compiler warnings in node_perf.cc
...
Currently, there are a few compiler warnings generated from node_perf.cc
regarding unused return values:
../src/node_perf.cc:58:3: warning: ignoring return value of function
declared with warn_unused_result attribute [-Wunused-result]
env->performance_entry_callback()->Call(context,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
../src/node_perf.cc:293:5: warning: ignoring return value of function
declared with warn_unused_result attribute [-Wunused-result]
obj->Set(context, idx, args[idx]);
^~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
../src/node_perf.cc:373:3: warning: ignoring return value of function
declared with warn_unused_result attribute [-Wunused-result]
target->DefineOwnProperty(context,
^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
../src/node_perf.cc:378:3: warning: ignoring return value of function
declared with warn_unused_result attribute [-Wunused-result]
target->DefineOwnProperty(context,
^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
This commit add checks/casts to avoid the warnings.
PR-URL: https://github.com/nodejs/node/pull/15112
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-03 06:35:53 +02:00
Marcelo Gobelli
08984b26d3
buffer: increase coverage by removing dead code
...
buffer.js:L196 `if (value == null)` guarantees `obj != null`
so L406+L418 are unnecessary.
PR-URL: https://github.com/nodejs/node/pull/15100
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-01 17:33:33 -04:00
Jon Moss
b12d77977e
errors,tools: alphabetize-errors lint rule
...
To make sure errors in lib/internal/errors.js (are defined via `E`)
will stay in alphabetical order going forward.
PR-URL: https://github.com/nodejs/node/pull/15083
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-01 17:29:15 -04:00
Jon Moss
324aa6488f
errors: alphabetize error codes
...
PR-URL: https://github.com/nodejs/node/pull/15083
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-01 17:28:42 -04:00
Piotr Mionskowski
ec599b87ae
doc: readFileSync instead of fs.readFileSync
...
The ALPN negotiation sample uses `fs.readFileSync` whereas
`readFileSync` is imported into top level variable.
PR-URL: https://github.com/nodejs/node/pull/15137
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-09-01 17:14:21 -04:00
Anna Henningsen
dd52cad044
doc,lib,src,test: strip executable bits off files
...
Remove the executable bits of the file modes of some files that
accidentally received it.
PR-URL: https://github.com/nodejs/node/pull/15132
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-01 10:09:41 -07:00
Anna Henningsen
f91897e741
src: remove unused persistent properties from env
...
PR-URL: https://github.com/nodejs/node/pull/15096
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-09-01 09:03:41 -07:00
Lance Ball
4bd44c11a5
repl: force editorMode in .load
...
The `.load` command would fail with any file that contains
multiline `.` operator expressions. This was particularly
noticeable when chaining promises or multi-line arrow
expressions.
This change Forces the REPL to be in `editorMode` while loading
a file from disk using the `.load` command.
Fixes: https://github.com/nodejs/node/issues/14022
PR-URL: https://github.com/nodejs/node/pull/14861
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-09-01 10:33:15 -04:00
Michaël Zasso
2ef0f007a4
test: split path tests into multiple files
...
Create one file for testing each function of the path module.
Keep general error tests and tests for constant properties in
test-path.js.
PR-URL: https://github.com/nodejs/node/pull/15093
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-09-01 14:28:53 +02:00
Ruben Bridgewater
204d94fc75
assert: handle errors properly with deep*Equal
...
PR-URL: https://github.com/nodejs/node/pull/15001
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-01 02:00:15 -03:00
matzavinos
219932a9f7
errors: convert 'fs'
...
covert lib/fs.js over to using lib/internal/errors.js
i have not addressed the cases that use errnoException(),
for reasons described in GH-12926
- throw the ERR_INVALID_CALLBACK error
when the the callback is invalid
- replace the ['object', 'string'] with
['string', 'object'] in the error constructor call,
to better match the previous err msg
in the getOptions() function
- add error ERR_VALUE_OUT_OF_RANGE in lib/internal/errors.js,
this error is thrown when a numeric value is out of range
- document the ERR_VALUE_OUT_OF_RANGE err in errors.md
- correct the expected args, in the error thrown in the function
fs._toUnixTimestamp() to ['Date', 'time in seconds'] (lib/fs.js)
- update the listener error type in the fs.watchFile() function,
from Error to TypeError (lib/fs.js)
- update errors from ERR_INVALID_OPT_VALUE to ERR_INVALID_ARG_TYPE
in the functions fs.ReadStream() and fs.WriteStream(),
for the cases of range errors use the new error:
ERR_VALUE_OUT_OF_RANGE (lib/fs.js)
PR-URL: https://github.com/nodejs/node/pull/15043
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2017-08-31 19:37:39 -04:00
Roman Reiss
a517466aa7
module: mark DEP0019 as EOL and remove compat code
...
This removes the compatibilty code that was in place to allow an unintended
interaction between `require('.')` and `NODE_PATH`. The compatibility code and
the accompanying deprecation warning has been in place since 2015-04-17.
PR-URL: https://github.com/nodejs/node/pull/3384
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-08-31 21:11:49 +02:00
Anatoli Papirovski
365c24591c
util: remove duplicate code in format
...
util.format contains an idential if statement within each branch
of switch. Move it before the switch statement for cleaner code
and better performance.
PR-URL: https://github.com/nodejs/node/pull/15098
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-30 18:52:28 -03:00
Jackson Tian
83a5eef6f2
lib: simplify the readonly properties of icu
...
Call Object.defineProperty() twice to set readonly property is
unnecessary.
PR-URL: https://github.com/nodejs/node/pull/13221
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-08-30 18:08:49 -03:00
Daniel Bevenius
c7dda4925d
tools: add eslint rule for inspector checking
...
The motivation for this commit is to pick up early on missing checks for
inspector support (when Node is built --without-inspector).
PR-URL: https://github.com/nodejs/node/pull/13813
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-08-30 18:03:51 -03:00
Daniel Bevenius
50ebac1124
tools: add eslint rule for hasCrypto checking
...
The motivation for this commit is to pick up early on missing checks for
crypto support (when Node is built --without-ssl).
There are currently usages of common.hasCrypto which are not just for
detecting if crypto support is available and then skip the test in
question. For these case we still want to have a lint error generated
which can then be disabled using an ESLint comment.
PR-URL: https://github.com/nodejs/node/pull/13813
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-08-30 18:02:58 -03:00
Lance Ball
ed1ba4580b
repl: remove REPLServer.createContext side effects
...
The internal method `REPLServer.createContext()` had
unexpected side effects. When called, the value for the
`underscoreAssigned` and `lines` properties were reset.
This change ensures that those properties are not modified
when a context is created.
Fixes: https://github.com/nodejs/node/issues/14226
Refs: https://github.com/nodejs/node/issues/7619
PR-URL: https://github.com/nodejs/node/pull/14331
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-08-30 16:22:16 -04:00
Jon Moss
676522fc02
doc: /s/SHASUM256/SHASUMS256
...
As an example, `curl https://nodejs.org/dist/v8.4.0/SHASUM256.txt ` will
return a 404 right now.
PR-URL: https://github.com/nodejs/node/pull/15101
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-30 16:15:11 -04:00
Roy Marples
0b0c2ec29a
build: add NetBSD support to opensslconf.h
...
Simplify the BSD list by defining OPENSSL_BSD if using a matching
BSD platform.
Add NetBSD to the list and update documentation.
PR-URL: https://github.com/nodejs/node/pull/14313
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-30 16:40:32 -03:00
Jackson Tian
9f175d1229
lib: remove the invalid command line options
...
The option --remote_debugging_server and --debug-agent are
not supported now.
PR-URL: https://github.com/nodejs/node/pull/13764
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-08-30 16:34:22 -03:00
Chris Young
c77e6d3f8c
n-api: adds function to adjust external memory
...
Added a wrapper around
v8::Isolate::AdjustAmountOfExternalAllocatedMemory
PR-URL: https://github.com/nodejs/node/pull/14310
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Fixes: https://github.com/nodejs/node/issues/13928
2017-08-30 22:27:11 +03:00
creeperyang
4218afce9a
doc: fix comment about http2.createSecureServer
...
PR-URL: https://github.com/nodejs/node/pull/15085
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-30 12:21:14 -07:00
Anatoli Papirovski
ad3d2ce68a
http2: handle 100-continue flow & writeContinue
...
Adds an implementation for writeContinue based on the h2 spec & the
existing http implementation. ClientHttp2Stream now also emits
a continue event when it receives headers with :status 100.
Includes two test cases for default server continue behaviour and
for the exposed checkContinue listener.
PR-URL: https://github.com/nodejs/node/pull/15039
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-30 12:00:49 -07:00
Ben Noordhuis
0f7c06eb2d
tls: fix object prototype type confusion
...
Use `Object.create(null)` for dictionary objects so that keys from
certificate strings or the authorityInfoAccess field cannot conflict
with Object.prototype properties.
PR-URL: https://github.com/nodejs/node/pull/14447
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-08-30 15:41:23 -03:00
Anatoli Papirovski
6eeb06f234
test: add a test for Expect & checkExpectation
...
New test case for Expect header & checkExpectation event based on the
existing http test case.
PR-URL: https://github.com/nodejs/node/pull/15040
Refs: https://github.com/nodejs/node/issues/14985
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-30 15:39:18 -03:00
Anatoli Papirovski
88441f6baf
test: add http2 test for method CONNECT
...
Adds test case for default handling of method CONNECT, as well
as the ability to bind a connect listener and handle the request.
PR-URL: https://github.com/nodejs/node/pull/15052
Refs: https://github.com/nodejs/node/issues/14985
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-30 15:36:10 -03:00
Brian White
5723c4c5f0
tls: replace forEach with for
...
PR-URL: https://github.com/nodejs/node/pull/15053
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-30 15:17:45 -03:00
Jackson Tian
67d792a74f
lib: clean up usage of threw
...
Use try/catch to instead of threw.
PR-URL: https://github.com/nodejs/node/pull/10534
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-30 15:16:15 -03:00
Weijia Wang
44d486500d
test: increase coverage for internal/errors.js
...
PR-URL: https://github.com/nodejs/node/pull/15044
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-08-30 15:10:09 -03:00
Jan Schär
a80b1621b0
doc: remove braces which shouldn't be there
...
PR-URL: https://github.com/nodejs/node/pull/15094
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-30 09:35:24 -07:00
Michaël Zasso
b98e8d995e
path: fix normalize on directories with two dots
...
PR-URL: https://github.com/nodejs/node/pull/14107
Fixes: https://github.com/nodejs/node/issues/14105
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-30 14:44:55 +02:00
Trevor Norris
244ada3c71
async_hooks: emitAfter correctly on fatalException
...
Previously calling emitAfter() from _fatalException would skipt the
first asyncId. Instead use the size() of the std::stack to determine how
many times to loop and call emitAfter().
PR-URL: https://github.com/nodejs/node/pull/14914
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2017-08-30 00:34:37 -06:00
Simon Brewster
5e443d7398
test: remove unused param in test-graph.pipe
...
Refs: https://twitter.com/NodeTodo/status/900502354834800645
PR-URL: https://github.com/nodejs/node/pull/15007
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-08-29 16:31:45 -03:00
Anatoli Papirovski
3eb029794c
test: increase coverage for http2 response headers
...
Expanded an existing test for setting pseudo-headers on response to
include all pseudo-headers, not just :status.
PR-URL: https://github.com/nodejs/node/pull/15035
Refs: https://github.com/nodejs/node/issues/14985
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-08-29 15:51:00 -03:00
Richard Lau
b46d59605d
build: add npx to zip and 7z packages
...
Copy npx and npx.cmd from `deps\npm\bin` for consistency with .msi
package.
PR-URL: https://github.com/nodejs/node/pull/15033
Refs: https://github.com/nodejs/node/pull/14235
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-29 15:45:38 -03:00
AJ Jordan
13927fd931
doc: clarify http.get data consumption requirement
...
With the previous wording, I read this sentence as meaning, "you
_must_ use the http.get callback mechanism and cannot register a
listener on the returned http.ClientRequest object." This is obviously
not the intention, so adjust the sentence to make this clearer.
PR-URL: https://github.com/nodejs/node/pull/15049
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-29 10:59:18 -07:00
XadillaX
1ffd01cf7f
test: fix hijackStdout behavior in console
...
`console.log` and some other function will swallow the exception in
`stdout.write`. So an asynchronous exception is needed, or
`common.hijackStdout` won't detect some exception.
Refs: https://github.com/nodejs/node/blob/v8.2.1/lib/console.js#L87
PR-URL: https://github.com/nodejs/node/pull/14647
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-08-29 10:48:53 -07:00
Anna Henningsen
5c0d64ea11
test: add regression test for 14814
...
Ref: https://github.com/nodejs/node/issues/14814
PR-URL: https://github.com/nodejs/node/pull/15023
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-29 09:51:52 -07:00
Anna Henningsen
a26be6866b
deps: cherry-pick 0ef4a0c64b6 from c-ares upstream
...
Original commit message:
gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()`
When `ares_cancel()` was invoked, `ares_gethostbyaddr()`
queries would fail with `ENOTFOUND` instead of `ECANCELLED`.
It seems appropriate to treat `ares_cancel()` like `ares_destroy()`,
but I would appreciate review of the correctness of this change.
Ref: https://github.com/nodejs/node/issues/14814
Fixes: https://github.com/nodejs/node/issues/14814
PR-URL: https://github.com/nodejs/node/pull/15023
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-08-29 09:51:44 -07:00
Shigeki Ohtsu
4218f1974d
crypto: fix error of createCipher in wrap mode
...
EVP_CIPHER_CTX_FLAG_WRAP_ALLOW flag needs to be set in using wrap mode
ciphers. In `crypto.createCipher()`, AES key wrap mode does not use a
default IV defined in RFC3394 but a generated IV with
`EVP_BytesToKey()` to be consistent API behaviors with other ciphers.
The built-in AES wrap mode in OpenSSL is not supported in FIPS mode as
http://openssl.6102.n7.nabble.com/AES-Key-Wrap-in-FIPS-Mode-td50238.html
so its tests in FIPS mode are skipped.
Fixes: https://github.com/nodejs/node/issues/15009
PR-URL: https://github.com/nodejs/node/pull/15037
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-30 01:20:10 +09:00