* Use `common.mustCall` for all callbacks
* Use `const` instead of `var`
PR-URL: https://github.com/nodejs/node/pull/9876
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9874
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Change var to const.
PR-URL: https://github.com/nodejs/node/pull/10055
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Replaces the use of assert.equal() with assert.strictEqual in test
code.
PR-URL: https://github.com/nodejs/node/pull/9935
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Use const instead of var for assignments.
PR-URL: https://github.com/nodejs/node/pull/9951
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Remove console statements and prefer strictEqual() over equal()
in assertions.
PR-URL: https://github.com/nodejs/node/pull/9887
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Make change in test file from var to const/let.
PR-URL: https://github.com/nodejs/node/pull/10018
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Orignial commit message:
[crankshaft] No need to rely on the @@hasInstance protector.
In Crankshaft we can actually do an abstract interpretation of the
@@hasInstance lookup when optimizing instanceof and then use the
normal machinery to protect the result instead of relying on the
global @@hasInstance protector cell for optimizations.
This recovers the 100x performance drop in Node.js v7 reported in
https://github.com/nodejs/node/issues/9634. This patch should be
easily back-mergable to Node.js v7.
BUG=v8:5640
R=yangguo@chromium.org,franzih@chromium.org
Committed: https://crrev.com/08377af957b1602396ebf3e11ae000f15ed09333
Cr-Commit-Position: refs/heads/master@{#41059}
PR-URL: https://github.com/nodejs/node/pull/9730
Fixes: https://github.com/nodejs/node/issues/9634
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
- updated vars to const
- add common.mustCall() to setup callback
PR-URL: https://github.com/nodejs/node/pull/9960
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Update var to const.
PR-URL: https://github.com/nodejs/node/pull/10056
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
- Updated references of var to const
- Updated assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9992
Reviewed-By: Rich Trott <rtrott@gmail.com>
Update `var` to `const`
PR-URL: https://github.com/nodejs/node/pull/10007
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Updated test-cluster-shared-handle-bind-privileged-port test
method to use assert.strictEqual() instead of assert.equal()
PR-URL: https://github.com/nodejs/node/pull/10042
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
- use assert.strictEqual instead of assert.equal
- add regexp for assert.throws
PR-URL: https://github.com/nodejs/node/pull/9883
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Now that `Buffer.alloc` exists, there is no reason to recommend using
`new Buffer(size).fill(0)` or `Buffer.allocUnsafe(size).fill(0)`.
PR-URL: https://github.com/nodejs/node/pull/10000
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
var -> let/const
.equal -> .strictEqual
PR-URL: https://github.com/nodejs/node/pull/9913
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Add a test for cancelling timers with null or no arguments.
PR-URL: https://github.com/nodejs/node/pull/10068
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
* start/end start *counting* at 0
* If fd is specified and start is omitted or undefined,
fs.createReadStream() reads sequentially from the current file
position.
Fixes: https://github.com/nodejs/node/issues/7099
PR-URL: https://github.com/nodejs/node/pull/10078
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit changes calls to `assert.equal()` to `assert.strictEqual()`.
PR-URL: https://github.com/nodejs/node/pull/9872
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Adds a test for when an invalid http method is passed into
http.request() to verify an error is thrown, that the
error is the correct type, and the error message is correct.
PR-URL: https://github.com/nodejs/node/pull/10080
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
- changed var to const
- changed assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9885
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
change var to const or let
change assert.equal to assert.strictEqual
PR-URL: https://github.com/nodejs/node/pull/9875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
The writing_tests.md file did not utilize kebab-case as the other files
in the directory did.
PR-URL: https://github.com/nodejs/node/pull/9867
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Adds tests for the case in which listeners() is invoked on a
EventEmitter with no events.
Adds a new test case for the situation in which a class
inherits from the EventEmitter but overrides the constructor
in the EventEmitter so that the _events is never set.
PR-URL: https://github.com/nodejs/node/pull/9865
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Minor fix to favor strict equality in http_server.js and tls_wrap.js
to ensure accurate comparisons without type coercion.
PR-URL: https://github.com/nodejs/node/pull/9849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
The Collaborators list in the README has a couple entries of people that
have left the Collaborators team in GitHub. This updates the list in the
README accordingly.
PR-URL: https://github.com/nodejs/node/pull/9846
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The doc says the debugger is and also isn't full-featured. Even if the
sentences are talking about different things, it's confusing.
`full-featured` seems superfluous in the first sentence anyway, so
remove it. Remove a superfluous `simple` while we're at it.
PR-URL: https://github.com/nodejs/node/pull/9832
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* Add RegExp arguments to throws assertions.
* Use common.mustCall for emitter callback.
PR-URL: https://github.com/nodejs/node/pull/9844
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Function declarations in the REPL are preprocessed into variable
declarations before being evaluated. However, the preprocessing logic
did not account for the star in a generator function declaration, which
caused the preprocessor to output invalid syntax in some circumstances.
PR-URL: https://github.com/nodejs/node/pull/9852
Fixes: https://github.com/nodejs/node/issues/9850
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Calling JS during GC is a no-no. So intead create a queue of all ids
that need to have their destroy() callback called and call them later.
Removed checking destroy() in test-async-wrap-uid because destroy() can
be called after the 'exit' callback.
Missing a reliable test to reproduce the issue that caused the
FATAL_ERROR.
PR-URL: https://github.com/nodejs/node/pull/9753
Fixes: https://github.com/nodejs/node/issues/8216
Fixes: https://github.com/nodejs/node/issues/9465
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This is how it's done everywhere else in core. Make it follow suit.
PR-URL: https://github.com/nodejs/node/pull/9753
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The constructor and destructor shouldn't have been placed in the -inl.h
file from the beginning.
PR-URL: https://github.com/nodejs/node/pull/9753
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Using NodeTodo I learned of a need to swap out the .equal function
with .strictEqual in a few test files.
https://twitter.com/NodeTodo/status/803657321993961472https://gist.github.com/Trott/864401455d4afa2428cd4814e072bd7c
additional commits squashed:
.strictEqual's argument signature is actual, expected, [message].
Previously some statements were listed as expected, actual.
As asked in PR i swapped them to match the correct argument signature.
PR-URL: https://github.com/nodejs/node/pull/9842
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Enable cpplint for files in test/cctest. Fix up the style issues it
reports.
PR-URL: https://github.com/nodejs/node/pull/9787
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Display python3-compatible error message for some systems use python3 as
default.
PR-URL: https://github.com/nodejs/node/pull/9657
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
- Add toUnicode and toASCII tests to test-punycode
- Refactor test-punycode.js to better organize test cases
- Change assert.equal to assert.strictEqual in test-punycode.js
PR-URL: https://github.com/nodejs/node/pull/9741
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>