summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
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>
2017-04-04linkedlist: remove unused methodsBrian White
PR-URL: https://github.com/nodejs/node/pull/11726 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2017-04-04events: do not keep arrays with a single listenerLuigi Pinca
Use the remaining listener directly if the array of listeners has only one element after running `EventEmitter.prototype.removeListener()`. Advantages: - Better memory usage and better performance if no new listeners are added for the same event. Disadvantages: - A new array must be created if new listeners are added for the same event. PR-URL: https://github.com/nodejs/node/pull/12043 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ron Korving <ron@ronkorving.nl>
2017-04-04linkedlist: remove public moduleBrian White
PR-URL: https://github.com/nodejs/node/pull/12113 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-04-04url: error when domainTo*() is called w/o argumentTimothy Gu
PR-URL: https://github.com/nodejs/node/pull/12134 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-04buffer,util: refactor for performanceRich Trott
internal/util.js definied toInteger() and toLength() but they were only used by buffer.js. Inlining these small functions results in a small but statistically-significant performance gain. PR-URL: https://github.com/nodejs/node/pull/12153 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-04child_process: improve killSignal validationsSakthipriyan Vairamani (thefourtheye)
As it is, the `killSignal` is just retrieved from an object and used. If the signal passed is actually one of the inherited properties of that object, Node.js will die. For example, ➜ node -e "child_process.spawnSync('ls', {killSignal: 'toString'})" Assertion failed: (0), function uv_close, file ....core.c, line 166. [1] 58938 abort node -e "child_process.spawnSync(...)" 1. This patch makes sure that the signal is actually a own property of the constants object. 2. Extends the killSignal validation to all the other functions. PR-URL: https://github.com/nodejs/node/pull/10423 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-04-03lib: ensure --check flag works for piped-in codeTeddy Katz
Previously, the --check CLI flag had no effect when run on code piped from stdin. This commit updates the bootstrap logic to handle the --check flag the same way regardless of whether the code is piped from stdin. PR-URL: https://github.com/nodejs/node/pull/11689 Fixes: https://github.com/nodejs/node/issues/11680 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2017-04-03buffer: zero fill Buffer(num) by defaultJames M Snell
PR-URL: https://github.com/nodejs/node/pull/12141 Ref: https://github.com/nodejs/CTC/issues/89 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-04-03errors: add space between error name and codeJames M Snell
`Error[CODE]` becomes `Error [CODE]` PR-URL: https://github.com/nodejs/node/pull/12099 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Evan Lucas <evanlucas@me.com>
2017-04-03v8: fix offsets for TypedArray deserializationAnna Henningsen
Fix the offset calculation for deserializing TypedArrays that are not aligned in their original buffer. Since `byteOffset` refers to the offset into the source `Buffer` instance, not its underlying `ArrayBuffer`, that is what should be passed to `buffer.copy`. PR-URL: https://github.com/nodejs/node/pull/12143 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-03assert: add support for Map and Set in deepEqualJoseph Gentle
assert.deepEqual and assert.deepStrictEqual currently return true for any pair of Maps and Sets regardless of content. This patch adds support in deepEqual and deepStrictEqual to verify the contents of Maps and Sets. Deeo equivalence checking is currently an O(n^2) operation, and worse, it gets slower exponentially if maps and sets were nested. Note that this change breaks compatibility with previous versions of deepEqual and deepStrictEqual if consumers were depending on all maps and sets to be seen as equivalent. The old behaviour was never documented, but nevertheless there are certainly some tests out there which depend on it. Support has stalled because the assert API was frozen, but was recently unfrozen in CTC#63. --- Later squashed in: This change updates the checks for deep equality checking on Map and Set to check all set values / all map keys to see if any of them match the expected result. This change is much slower, but based on the conversation in the pull request its probably the right approach. Fixes: https://github.com/nodejs/node/issues/2309 Refs: https://github.com/substack/tape/issues/342 Refs: https://github.com/nodejs/node/pull/2315 Refs: https://github.com/nodejs/CTC/issues/63 PR-URL: https://github.com/nodejs/node/pull/12142 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-04-03util: show External values explicitly in inspectAnna Henningsen
Display `v8::External` values as `[External]` rather than `{}` which makes them look like objects. PR-URL: https://github.com/nodejs/node/pull/12151 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-04-03zlib: support Uint8Array in convenience methodsTimothy Gu
Also support Uint8Array as a `dictionary` option. PR-URL: https://github.com/nodejs/node/pull/12001 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-04-02net: rename internal functions for readabilityJoyee Cheung
* Rename listen to listenInCluster * Rename _listen2 to _setupListenHandle * Remove _listen since it's a one-liner only used in one place * Correct comments in server.listen PR-URL: https://github.com/nodejs/node/pull/11796 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-04-01crypto: add sign/verify support for RSASSA-PSSTobias Nießen
Adds support for the PSS padding scheme. Until now, the sign/verify functions used the old EVP_Sign*/EVP_Verify* OpenSSL API, making it impossible to change the padding scheme. Fixed by first computing the message digest and then signing/verifying with a custom EVP_PKEY_CTX, allowing us to specify options such as the padding scheme and the PSS salt length. Fixes: https://github.com/nodejs/node/issues/1127 PR-URL: https://github.com/nodejs/node/pull/11705 Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-03-31tty: remove NODE_TTY_UNSAFE_ASYNCJeremiah Senkpiel
Nothing but trouble can ever come from it. PR-URL: https://github.com/nodejs/node/pull/12057 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-30inspector: use inspector API for "break on start"Eugene Ostroukhov
This change removes a need for using deprecated debug context for breaking at the start of the main module. PR-URL: https://github.com/nodejs/node/pull/12076 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-29url: add ToObject method to native URL classJames M Snell
Provides a factory method to convert a native URL class into a JS URL object. ```c++ Environment* env = ... URL url("http://example.org/a/b/c?query#fragment"); MaybeLocal<Value> val = url.ToObject(env); ``` PR-URL: https://github.com/nodejs/node/pull/12056 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-03-29util: add %i and %f formatting specifiersRoman Reiss
This change brings formatting specifiers available in `util.format` and consequently, `console.*` closer to what is supported in all major browsers. - `%i` is introduced to format integer values. - `%f` is introduced to format floating point values. Fixes: https://github.com/nodejs/node/issues/10292 PR-URL: https://github.com/nodejs/node/pull/10308 Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-29v8: expose new V8 serialization APIAnna Henningsen
Expose the new serialization API that was added in V8 5.5 to userland. The JS API is virtually a direct copy of what V8 provides on the C++ level. This is useful Node as a possible replacement for some internals that currently use JSON, like IPC, but is likely to be useful to general userland code as well. PR-URL: https://github.com/nodejs/node/pull/11048 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-29buffer: expose FastBuffer on internal/bufferAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/11048 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-28util: use `[Array]` for deeply nested arraysAnna Henningsen
Prefer `[Array]` over `[Object]` because the latter is confusing. PR-URL: https://github.com/nodejs/node/pull/12046 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-03-28lib: add comment to script eval _tickCallbackGibson Fahnestock
Add a comment to match lib/module.js, missed in #11958. PR-URL: https://github.com/nodejs/node/pull/12050 Ref: https://github.com/nodejs/node/pull/11958 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2017-03-27Partial revert "tls: keep track of stream that is closed"Trevor Norris
This partually reverts commit 4cdb0e89d8daf7e1371c3b8d3f057940aa327d4a. A nullptr check in TSLWrap::IsAlive() and the added test were left. PR-URL: https://github.com/nodejs/node/pull/11947 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2017-03-27crypto: support Uint8Array prime in createDHAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/11983 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-27tls: support Uint8Arrays for protocol list buffersAnna Henningsen
PR-URL: https://github.com/nodejs/node/pull/11984 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-27dgram: support Uint8Array input to send()Anna Henningsen
Fixes: https://github.com/nodejs/node/issues/11954 Refs: https://github.com/nodejs/node/pull/11961 PR-URL: https://github.com/nodejs/node/pull/11985 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-03-26http: should support userland Agentfengmk2
PR-URL: https://github.com/nodejs/node/pull/11567 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-26url: name anonymous functions in urlPedro lima
Name anonymous functions in url.js. PR-URL: https://github.com/nodejs/node/pull/9225 Ref: https://github.com/nodejs/node/issues/8913 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-26lib: clarify the usage of 'else'Jackson Tian
The keyword 'else' is unnecessary after 'throw' statements. PR-URL: https://github.com/nodejs/node/pull/11148 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-26net: refactor net module to module.exportsClaudio Rodriguez
Refactor net module to use the more efficient module.exports = {} pattern. Also renames internal "connect" function to "internalConnect" to avoid collision with exported "connect". PR-URL: https://github.com/nodejs/node/pull/11698 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-26lib: remove an unnecessary coverage checkJeremiah Senkpiel
PR-URL: https://github.com/nodejs/node/pull/12023 Fixes: https://github.com/nodejs/node/issues/11445 Refs: f65a48fc8f89071dc326e4d84646b5cbcfa8eca7 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-25process: maintain constructor descriptorBryan English
Use the original property descriptor instead of just taking the value, which would, by default, be non-writable and non-configurable. PR-URL: https://github.com/nodejs/node/pull/9306 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-03-24events: update and clarify error messageChris Burkhart
Update error message that's thrown when no error listeners are attached to an emitter. PR-URL: https://github.com/nodejs/node/pull/10387 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-03-24lib: use Object.create(null) directlyTimothy Gu
After V8 5.6, using Object.create(null) directly is now faster than using a constructor for map-like objects. PR-URL: https://github.com/nodejs/node/pull/11930 Refs: https://github.com/emberjs/ember.js/issues/15001 Refs: https://crrev.com/532c16eca071df3ec8eed394dcebb932ef584ee6 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24url: use a class for WHATWG url[context]Timothy Gu
The object is used as a structure, not as a map, which `StorageObject` was designed for. PR-URL: https://github.com/nodejs/node/pull/11930 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-24lib: fix event race condition with -eBen Noordhuis
Commit c5b07d4 ("lib: fix beforeExit not working with -e") runs the to-be-evaluated code at a later time than before because it switches from `process.nextTick()` to `setImmediate()`. It affects `-e 'process.on("message", ...)'` because there is now a larger time gap between startup and attaching the event listener, increasing the chances of missing early messages. I'm reasonably sure `process.nextTick()` was also susceptible to that, only less pronounced. Avoid the problem altogether by evaluating the code synchronously. Harmonizes the logic with `Module.runMain()` from lib/module.js which also calls `process._tickCallback()` afterwards. PR-URL: https://github.com/nodejs/node/pull/11958 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-23tls: make rejectUnauthorized default to trueghaiklor
rejectUnauthorized used to be false when the property was undefined or null, quietly allowing client connections for which certificates have been requested (requestCert is true) even when the client certificate was not authorized (signed by a trusted CA). Change this so rejectUnauthorized is always true unless it is explicitly set to false. PR-URL: https://github.com/nodejs/node/pull/5923 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-23url: show input in parse error messageJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/11934 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2017-03-22lib,src: make constants not inherit from ObjectSakthipriyan Vairamani (thefourtheye)
Make sure `constants` object and all the nested objects don't inherit from `Object.prototype` but from `null`. PR-URL: https://github.com/nodejs/node/pull/10458 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-22events, doc: check input in defaultMaxListenersDavidCai
PR-URL: https://github.com/nodejs/node/pull/11938 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-22timers: fix not to close reused timer handleShigeki Ohtsu
The timer handle is reused when it is unrefed in order to avoid new callback in beforeExit(#3407). If it is unrefed within a setInterval callback, the reused timer handle is closed so that setInterval no longer keep working. This fix does not close the handle in case of setInterval. PR-URL: https://github.com/nodejs/node/pull/11646 Reviewed-By: Julien Gilli <jgilli@nodejs.org> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-22http: avoid retaining unneeded memoryLuigi Pinca
Prevent the events listeners of the sockets obtained with the HTTP upgrade mechanism from retaining unneeded memory. Ref: https://github.com/nodejs/node/issues/11868 PR-URL: https://github.com/nodejs/node/pull/11926 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-03-22lib: Use regex to compare error messageKunal Pathak
To make node engine agnostic, use better comparison method for error message. Lazily populate the `circular reference` error message thrown by `JSON.stringify()` which can be used to compare the error message thrown. PR-URL: https://github.com/nodejs/node/pull/11854 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2017-03-22readline: rename `deDupeHistory` optionDanny Nemer
Renames `options.deDupeHistory` → `options.removeHistoryDuplicates` for `readline.createInterface(options)`. The option name `removeHistoryDuplicates` is preferable to the semantically identical name `deDupeHistory` because "dedupe" (short for "deduplication") is obscure and neologistic while `removeHistoryDuplicates` is clear, though verbose. Updates tests and documentation for this option accordingly. PR-URL: https://github.com/nodejs/node/pull/11950 Ref: https://github.com/nodejs/node/pull/2982 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-03-21errors: remove needless lazyAssertDavidCai
PR-URL: https://github.com/nodejs/node/pull/11891 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>