summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2017-04-25tools: enable no-useless-return eslint rulecjihrig
PR-URL: https://github.com/nodejs/node/pull/12577 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-24url: use internal/util's getConstructorOfTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/12526 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-24util: move getConstructorOf() to internalTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/12526 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-24url: update WHATWG URL API to latest specTimothy Gu
- Update to spec - Add opaque hosts - File state did not correctly deal with lack of base URL - Cleanup API for file and non-special URLs - Allow % and IPv6 addresses in non-special URL hosts - Use specific names for percent-encode sets - Add empty host concept for file and non-special URLs - Clarify IPv6 serializer - Fix existing mistakes - Add missing ':' to forbidden host code point list. - Correct IPv4 parser empty label behavior - Maintain type equivalence in URLContext with spec - scheme, username, and password should always be strings - host, port, query, and fragment may be strings or null - Align scheme state more closely with the spec - Make sure the `special` variable is always synced with URL_FLAG_SPECIAL. PR-URL: https://github.com/nodejs/node/pull/12523 Fixes: https://github.com/nodejs/node/issues/10608 Fixes: https://github.com/nodejs/node/issues/10634 Refs: https://github.com/whatwg/url/pull/185 Refs: https://github.com/whatwg/url/pull/225 Refs: https://github.com/whatwg/url/pull/224 Refs: https://github.com/whatwg/url/pull/218 Refs: https://github.com/whatwg/url/pull/243 Refs: https://github.com/whatwg/url/pull/260 Refs: https://github.com/whatwg/url/pull/268 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-04-24lib: fix typo in comments in module.jsWORMSS
A minor typo in comments, no logic changes. PR-URL: https://github.com/nodejs/node/pull/12528 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Cai <davidcai1993@yahoo.com> Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
2017-04-24url: improve descriptiveness of identifierRich Trott
Change variable for protocols that do not always contain `//` to `noLeadingSlashes` so someone reading the code knows what it means. PR-URL: https://github.com/nodejs/node/pull/12579 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-24http: add type checking for hostnameJames M Snell
Add type checking for options.hostname / options.host Maintains the use of `undefined` and `null` for default `localhost`, but other falsy values (like `false`, `0` and `NaN`) are rejected. PR-URL: https://github.com/nodejs/node/pull/12494 Ref: https://github.com/nodejs/node/issues/12488 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2017-04-24debugger: remove obsolete _debug_agent.jsRich Trott
With _debugger.js removed, _debug_agent.js appears to be unnecessary. PR-URL: https://github.com/nodejs/node/pull/12582 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-24errors: assign error code to bootstrap_node created errorJames M Snell
This does not use the internal/errors.js module because the error in question may actually be *caused* by an attempt to load internal/errors.js. This error should only be encountered in the case of a bug within Node.js itself. PR-URL: https://github.com/nodejs/node/pull/11298 Ref: https://github.com/nodejs/node/issues/11273 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-04-21lib: refactor internal/utilJames M Snell
* Use the more efficient module.exports = {} approach * Eliminate some uses of arguments PR-URL: https://github.com/nodejs/node/pull/11404 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net
2017-04-21events: remove unreachable codecjihrig
Commit 8d386ed7e1301c869bbc266ce73650b280c9ae26 stopped the Event Emitter implementation from storing arrays containing a single listener. This change left a section of code in removeListener() as unreachable. This commit removes the unreachable code. Refs: https://github.com/nodejs/node/pull/12043 PR-URL: https://github.com/nodejs/node/pull/12501 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-21lib: remove _debugger.jsBen Noordhuis
The file no longer works after the removal of the --debug/--debug-brk switches in commit 47f8f74 ("src: remove support for --debug".) This commit also removes several tests that still referenced the old debugger but were either unit-testing its internals or passing for the wrong reason (like expecting an operation to fail, which it did because the debugger is gone.) PR-URL: https://github.com/nodejs/node/pull/12495 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-21lib,src,test: update --debug/debug-brk commentsBen Noordhuis
Overlooked in commit 47f8f74 ("src: remove support for --debug") from earlier this month. PR-URL: https://github.com/nodejs/node/pull/12495 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-20errors: port internal/process errors to internal/errorsJames M Snell
* Assign codes to the handful of errors reported by internal/process/*.js * Include documentation for the new error codes * Improve error messages * Improve test coverage for process.nextTick PR-URL: https://github.com/nodejs/node/pull/11294 Ref: https://github.com/nodejs/node/issues/11273 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-04-20repl: support hidden history file on WindowsBartosz Sosnowski
On Windows when REPL history file has the hidden attribute node will fail when trying to open it in 'w' mode. This changes the mode to 'r+'. The file is guaranteed to exists because of earlier open call with 'a+'. Fixes: https://github.com/nodejs/node/issues/5261 PR-URL: https://github.com/nodejs/node/pull/12207 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-19module: standardize strip shebang behaviourSebastian Van Sande
When loading a module, Node needs to finds the end of a shebang comment by searching for a \r or \n character. This behaviour is now standardized into a dedicated internal module function Refs: https://github.com/nodejs/node/issues/12180 PR-URL: https://github.com/nodejs/node/pull/12202 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-19buffer: add pending deprecation warningJames M Snell
The pending deprecation warning is off by default. Launch the node process with --pending-deprecation or NODE_PENDING_DEPRECATION=1 env var set. PR-URL: https://github.com/nodejs/node/pull/11968 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-18net: require 'dns' only onceBen Noordhuis
Avoid unnecessary calls to require('dns') by caching the result of the first one. PR-URL: https://github.com/nodejs/node/pull/12342 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-18net: don't normalize twice in Socket#connect()Ben Noordhuis
Split up Socket#connect() so that we don't call normalizeArgs() twice when invoking net.connect() or net.createConnection(). PR-URL: https://github.com/nodejs/node/pull/12342 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-18net: don't concatenate strings in debug loggingBen Noordhuis
Not necessary, not a good idea. PR-URL: https://github.com/nodejs/node/pull/12342 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-18net: remove unnecessary process.nextTick()Ben Noordhuis
Call internalConnect() directly when the target is an IP address. No delay is necessary because it defers any callbacks it makes. PR-URL: https://github.com/nodejs/node/pull/12342 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-18net: don't create unnecessary closureBen Noordhuis
Don't call `Function#bind()` when a direct method call works just as well and is much cheaper. PR-URL: https://github.com/nodejs/node/pull/12342 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-18net: don't create unnecessary closureBen Noordhuis
Pass arguments to fireErrorCallbacks() explicitly. Saves allocation an unnecessary closure context. PR-URL: https://github.com/nodejs/node/pull/12342 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-18crypto: remove unused C++ parameter in sign/verifyTobias Nießen
Removes code in node_crypto.cc in Sign::SignFinal and Verify::VerifyFinal which allowed to convert between buffers and strings based on given encodings. The code is unused as crypto.js only passes in and expects buffers and does the conversion itself. The encoding parameter was removed from both methods. PR-URL: https://github.com/nodejs/node/pull/12397 Reviewed-By: Sam Roberts <vieuxtech@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-04-18buffer: fix backwards incompatibilityBrian White
4a86803f6 introduced a backwards incompatibility by accident and was not caught due to an existing test that wasn't strict enough. This commit fixes both the backwards incompatibility and the test. PR-URL: https://github.com/nodejs/node/pull/12439 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-18tools,lib: enable strict equality lint ruleRich Trott
Enablie a lint rule to require `===` and `!==` instead of `==` and `!=` except in some well-defined cases: * comparing against `null` as a shorthand for also checking for `undefined` * comparing the result of `typeof` * comparing literal values In cases where `==` or `!=` are being used as optimizations, use an ESLint comment to disable the `eqeqeq` rule for that line explicitly. I rather like this because it's a signal that the usage is intentional and not a mistake. PR-URL: https://github.com/nodejs/node/pull/12446 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-18net: refactor onSlaveClose in Server.closeClaudio Rodriguez
Refactors onSlaveClose in Server.close to be an arrow function, removes need for `self = this` and moves it down to make code more readable. PR-URL: https://github.com/nodejs/node/pull/12334 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
2017-04-17child_process: improve ChildProcess validationcjihrig
This commit improves input validation for the ChildProcess internals. It became officially supported API a while back, but never had any validation. Refs: https://github.com/nodejs/node/issues/12177 PR-URL: https://github.com/nodejs/node/pull/12348 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-17child_process: minor cleanup of internalscjihrig
This commit removes self = this style assignments and replaces some array iteration functions with a simpler for loop. PR-URL: https://github.com/nodejs/node/pull/12348 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-17crypto: add randomFill and randomFillSyncEvan Lucas
crypto.randomFill and crypto.randomFillSync are similar to crypto.randomBytes, but allow passing in a buffer as the first argument. This allows us to reuse buffers to prevent having to create a new one on every call. PR-URL: https://github.com/nodejs/node/pull/10209 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-15url: improve WHATWG URL inspectionTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/12253 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-15url: clean up WHATWG URL origin generationTimothy Gu
- Use ordinary properties instead of symbols/getter redirection for internal object - Use template string literals - Remove unneeded custom inspection for internal objects - Remove unneeded OpaqueOrigin class - Remove unneeded type checks PR-URL: https://github.com/nodejs/node/pull/12252 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-14buffer: use slightly faster NaN checkBrian White
PR-URL: https://github.com/nodejs/node/pull/12286 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-04-14buffer: optimize write()Brian White
PR-URL: https://github.com/nodejs/node/pull/12361 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-14buffer: optimize toString()Brian White
PR-URL: https://github.com/nodejs/node/pull/12361 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-14buffer: optimize from() and byteLength()Brian White
PR-URL: https://github.com/nodejs/node/pull/12361 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-14crypto: make LazyTransform compabile with Streams1Matteo Collina
Makes LazyTransform writable by Streams1 by assigning .writable = true before the actual classes are loaded. Fixes: https://github.com/nodejs/node/issues/12269 PR-URL: https://github.com/nodejs/node/pull/12380 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-14stream: Fixes missing 'unpipe' eventChristopher Luke
Currently when the destination emits an 'error', 'finish' or 'close' event the pipe calls unpipe to emit 'unpipe' and trigger the clean up of all it's listeners. When the source emits an 'end' event without {end: false} it calls end() on the destination leading it to emit a 'close', this will again lead to the pipe calling unpipe. However the source emitting an 'end' event along side {end: false} is the only time the cleanup gets ran directly without unpipe being called. This fixes that so the 'unpipe' event does get emitted and cleanup in turn gets ran by that event. Fixes: https://github.com/nodejs/node/issues/11837 PR-URL: https://github.com/nodejs/node/pull/11876 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-13doc: limit lines to 80 cols in internal READMEEvan Lucas
We generally stick to 80 columns even in markdown files. PR-URL: https://github.com/nodejs/node/pull/12358 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-04-13src: use option parser for expose_internalsSam Roberts
bootstrap_node.js was directly parsing process.execArgv to see if internals should be exposed, even though the argv was already parsed by node. This is unusual and unnecessary, change it to set the option value from the parser onto the config binding. PR-URL: https://github.com/nodejs/node/pull/12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-12assert: improve assert.fail() APIRich Trott
assert.fail() has two possible function signatures, both of which are not intuitive. It virtually guarantees that people who try to use assert.fail() without carefully reading the docs will end up using it incorrectly. This change maintains backwards compatibility with the two valid uses (arguments 1 2 and 4 supplied but argument 3 falsy, and argument 3 supplied but arguments 1 2 and 4 all falsy) but also adds the far more intuitive first-argument-only and first-two-arguments-only possibilities. assert.fail('boom'); // AssertionError: boom assert.fail('a', 'b'); // AssertionError: 'a' != 'b' PR-URL: https://github.com/nodejs/node/pull/12293 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-12url: remove javascript URL special caseDaijiro Wachi
Fixes: https://github.com/nodejs/node/issues/11485 PR-URL: https://github.com/nodejs/node/pull/12331 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-12zlib: support all ArrayBufferView typesTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/12223 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-12crypto: support all ArrayBufferView typesTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/12223 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-11src,test: debug is now an alias for inspectAli Ijaz Sheikh
`node debug` is now an alias of `node inspect`. This is intended to be a minimal change – it does not get rid of the the debugger code. That can be done in a follow-on. PR-URL: https://github.com/nodejs/node/pull/11441 Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: joshgav - Josh Gavant <josh.gavant@outlook.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
2017-04-10crypto: handle exceptions in hmac/hash.digestTobias Nießen
Forced conversion of the encoding parameter to a string within crypto.js, fixing segmentation faults in node_crypto.cc. Fixes: https://github.com/nodejs/node/issues/9819 PR-URL: https://github.com/nodejs/node/pull/12164 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-08util: use V8 C++ API for inspecting PromisesTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/12254 Refs: https://github.com/nodejs/node/issues/11875 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
2017-04-05buffer: preallocate array with buffer lengthalejandro
Because the final array length is known, it's better to allocate its final length at initialization time to avoid future reallocations. Also add an explicit buffer length greater than 0 comparison so it's more readable, avoids the internal ToBoolean call and follows the standard Node.js API format (as it can be checked in other similar structures where 'length > 0' is preferred over 'length') PR-URL: https://github.com/nodejs/node/pull/11733 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-04-04url: avoid instanceof for WHATWG URLBrian White
PR-URL: https://github.com/nodejs/node/pull/11690 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-04-04test: add Unicode characters regression testAlexey Orlenko
This test ensures that UTF-8 characters can be used in core JavaScript modules built into Node's binary. PR-URL: https://github.com/nodejs/node/pull/11423 Ref: https://github.com/nodejs/node/pull/11129 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>