0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

4016 Commits

Author SHA1 Message Date
Daniel Bevenius
da0651ac1b vm: change ContextifyScript to Script in comment
Reading the comment at the top of the vm.js, I think that
ContextifyScript should perhaps just be Script.

PR-URL: https://github.com/nodejs/node/pull/8415
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-08 08:41:23 +02:00
not-an-aardvark
079acccb56 crypto: add crypto.timingSafeEqual()
Reinstate crypto.timingSafeEqual() which was reverted due to test
issues. The flaky test issues are resolved in this new changeset.

PR-URL: https://github.com/nodejs/node/pull/8304
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-09-07 16:29:41 -07:00
atstojanov
a6f7b13d02
crypto: fix getDecoder() encoding check
Normalize the encoding in getDecoder() before using it. Fixes an
AssertionError: "Cannot change encoding" when encoding is "ucs2",
"ucs-2" or "utf-16le"

Fixes: https://github.com/nodejs/node/issues/8236
PR-URL: https://github.com/nodejs/node/pull/8301
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-04 18:39:43 +02:00
Anna Henningsen
983775d457
events: make memory leak warning name more verbose
Switch from a generic `Warning` to the more specific
`MaxListenersExceededWarning`.

Ref: https://github.com/nodejs/node/pull/8298
PR-URL: https://github.com/nodejs/node/pull/8341
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-09-04 17:11:59 +02:00
James M Snell
7b73f55902 internal/util: remove printDeprecationWarning
Removes the internal/util printDeprecationWarning method

PR-URL: https://github.com/nodejs/node/pull/8166
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-09-02 13:15:56 -07:00
James M Snell
b50557b51b fs: use process.emitWarning to print deprecation warning
Use process.emitWarning() instead of the internal printDeprecationMessage
in order to avoid use of an internal only API.

PR-URL: https://github.com/nodejs/node/pull/8166
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-09-02 13:15:27 -07:00
James M Snell
15eaba98a1 lib: use emitWarning instead of printDeprecationMessage
The process.emitWarning() API should be used for printing
deprecation warning messages rather than directly using the
internal/util#printDeprecationMessage

PR-URL: https://github.com/nodejs/node/pull/8166
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-09-02 13:15:22 -07:00
James M Snell
bf91035364 process: fix handling of process.noDeprecation in emitWarning
PR-URL: https://github.com/nodejs/node/pull/8166
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-09-02 13:15:17 -07:00
James M Snell
dc7277909b fs: move SyncWriteStream to internal/fs
Move the implementation of SyncWriteStream to internal/fs.

PR-URL: https://github.com/nodejs/node/pull/6749
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-09-02 10:22:00 -07:00
Anna Henningsen
2c9a86f01e
buffer: directly use ArrayBuffer as the pool
Make the buffer pool an `ArrayBuffer` which is used directly,
speeding up allocation noticeably in some cases.
The only drawback happens when creating pool-based `Buffer`
instances from strings whose byte lengths got overestimated
by `Buffer.byteLength`, e.g. for base64-encoded strings
containing whitespace, where two `Buffer` instances are
being created.

This may also be useful when providing Buffer classes in
the future.

Benchmark results for `benchmark/buffers/buffer-creation.js`:

```
                                 improvement significant      p.value
len=1024 type="buffer()"             47.11 %         *** 5.202555e-12
len=1024 type="fast-alloc"           -3.41 %             3.823226e-01
len=1024 type="fast-alloc-fill"       1.11 %             7.985624e-01
len=1024 type="fast-allocUnsafe"     24.37 %         *** 4.264084e-05
len=1024 type="slow"                  4.81 %             2.634609e-01
len=1024 type="slow-allocUnsafe"      1.28 %             7.864850e-01
len=10 type="buffer()"               59.42 %         *** 9.953552e-13
len=10 type="fast-alloc"             -6.43 %             1.450524e-01
len=10 type="fast-alloc-fill"        -2.96 %             4.873766e-01
len=10 type="fast-allocUnsafe"       33.89 %         *** 6.517268e-07
len=10 type="slow"                   -1.48 %             7.357711e-01
len=10 type="slow-allocUnsafe"        0.04 %             9.939576e-01
len=2048 type="buffer()"             36.34 %         *** 3.201045e-10
len=2048 type="fast-alloc"           -4.67 %             2.172900e-01
len=2048 type="fast-alloc-fill"      -0.15 %             9.732945e-01
len=2048 type="fast-allocUnsafe"     20.13 %         *** 2.372115e-04
len=2048 type="slow"                  4.35 %             2.831340e-01
len=2048 type="slow-allocUnsafe"      1.13 %             8.055388e-01
len=4096 type="buffer()"              4.90 %             2.495340e-01
len=4096 type="fast-alloc"           -2.11 %             5.417520e-01
len=4096 type="fast-alloc-fill"      -0.29 %             9.460378e-01
len=4096 type="fast-allocUnsafe"      3.11 %             5.001959e-01
len=4096 type="slow"                  0.95 %             8.145888e-01
len=4096 type="slow-allocUnsafe"      3.74 %             4.227627e-01
len=8192 type="buffer()"              5.08 %             2.263029e-01
len=8192 type="fast-alloc"           -1.16 %             7.300235e-01
len=8192 type="fast-alloc-fill"       0.40 %             9.179919e-01
len=8192 type="fast-allocUnsafe"      5.16 %             2.591544e-01
len=8192 type="slow"                  2.57 %             5.212449e-01
len=8192 type="slow-allocUnsafe"     -3.19 %             4.699138e-01
```

PR-URL: https://github.com/nodejs/node/pull/8302
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-02 12:38:12 +02:00
Anna Henningsen
932c824c60
events: make memory leak warning more accessible
This makes the famous `EventEmitter memory leak` warnings occurring
when the listener count for a given event exceeds a specified number
more programatically accessible, by giving them properties referring
to the event emitter instance and the event itself.

This can be useful for debugging the origins of such a warning when
the stack itself doesn’t reveal enough information about the event
emitter instance itself, e.g. when manual inspection of the
already-registered listeners is expected to be useful.

PR-URL: https://github.com/nodejs/node/pull/8298
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <Fishrock123@rocketmail.com>
2016-08-30 17:02:51 +02:00
Brian White
2cc7fa5e7d
http: remove deprecated Client interface
PR-URL: https://github.com/nodejs/node/pull/8104
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-29 21:44:58 -04:00
James M Snell
07dbf7313d promise: hard deprecation for unhandled promise rejection
PR-URL: https://github.com/nodejs/node/pull/8217
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-08-29 16:27:58 -07:00
Benjamin Gruenbaum
ecf474ceba promise: warn on unhandled rejections
Log unhandled promise rejections with a guid and emit
a process warning. When rejection is eventually handled,
emit a secondary warning.

PR-URL: https://github.com/nodejs/node/pull/8217
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-08-29 16:27:38 -07:00
James M Snell
49ef3ae90a Revert "fs: add a temporary fix for re-evaluation support"
As planned, This reverts commit 1d79787e2e.

Fixes: https://github.com/nodejs/node/issues/5213
PR-URL: https://github.com/nodejs/node/pull/6413
Reviewed-By: Ben Noordhuis <info@noordhuis.nl>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: JungMinu - Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-29 15:11:00 -07:00
Anna Henningsen
4863f6a121
net: make holding the buffer in memory more robust
Set the `req.buffer` property, which serves as a way of keeping
a `Buffer` alive that is being written to a stream, on the C++
side instead of the JS side.

This closes a hole where buffers that were temporarily created
in order to write strings with uncommon encodings (e.g. `hex`)
were passed to the native side without being set as `req.buffer`.

Fixes: https://github.com/nodejs/node/issues/8251
PR-URL: https://github.com/nodejs/node/pull/8252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-08-27 16:11:46 +02:00
Prince J Wesley
5bef38b627
repl: Auto alignment for .editor mode
When in `.editor` mode, current line whitespace prefixes
are preserved in the subsequent line. User can hit backspace
to clean the whitespace

```js
node 🙈 ₹ node
> .editor
// Entering editor mode (^D to finish, ^C to cancel)
function test() {
  console.log('tested!'); //On enter, cursor will be after 2 spaces
  _
```

PR-URL: https://github.com/nodejs/node/pull/8241
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-27 16:53:59 +05:30
Sakthipriyan Vairamani
f8f283b8f3
fs: warn if no callback is passed to async calls
This patch issues a deprecation warning, if an asynchronous function
is called without a callback function.

PR-URL: https://github.com/nodejs/node/pull/7897
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-27 12:43:43 +05:30
Brian White
1050594c86
http: fix connection upgrade checks
This commit fixes connection upgrade checks, specifically when headers
are passed as an array instead of a plain object to http.request()

Fixes: https://github.com/nodejs/node/issues/8235
PR-URL: https://github.com/nodejs/node/pull/8238
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-26 10:17:34 -04:00
Sakthipriyan Vairamani
b3e7ac2605
util: improve function signature of util._extend
The function signature of `util._extend` is not intuitive and the
documentation doesn't specify the necessary second parameter. This
patch changes the parameter names in the code and the function params
in doc.

PR-URL: https://github.com/nodejs/node/pull/8187
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-08-26 18:53:39 +05:30
Nikolai Vavilov
f2fe5583c4 buffer: runtime deprecation of calling Buffer without new
PR-URL: https://github.com/nodejs/node/pull/8169
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-25 11:08:19 -07:00
Anna Henningsen
a60ed89178
util: allow returning this from custom inspect
If a custom inspection function returned `this`, use that value
for further formatting instead of going into infinite recursion.

This is particularly useful when combined with `util.inspect.custom`
because returning `this` from such a method makes it easy to
have an `inspect()` function that is ignored by `util.inspect` without
actually having to provide an alternative for custom inspection.

PR-URL: https://github.com/nodejs/node/pull/8174
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-08-25 07:18:12 +02:00
Anna Henningsen
59714cb7b3
util: allow symbol-based custom inspection methods
Add a `util.inspect.custom` Symbol which can be used to customize
`util.inspect()` output. Providing `obj[util.inspect.custom]`
works like providing `obj.inspect`, except that the former allows
avoiding name clashes with other `inspect()` methods.

Fixes: https://github.com/nodejs/node/issues/8071
PR-URL: https://github.com/nodejs/node/pull/8174
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-08-25 07:13:00 +02:00
Ilkka Myller
51f96dfcfc url: keep auth in url.resolve() if host matches
Fixes: https://github.com/nodejs/node/issues/8165

PR-URL: https://github.com/nodejs/node/pull/8215
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-24 11:40:14 -07:00
Ilkka Myller
286d44e43d url: fix inconsistent port in url.resolveObject
This commit fixes bug where url.resolveObject returns conflicting
host and port values.

Fixes: https://github.com/nodejs/node/issues/8213
PR-URL: https://github.com/nodejs/node/pull/8214
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-23 12:44:00 -07:00
Brian White
a206afec76
net: add length check when normalizing args
This helps to prevent possible deoptimizations that arise when trying
to access nonexistent indices.

PR-URL: https://github.com/nodejs/node/pull/8112
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-23 15:12:44 -04:00
Brian White
d28159f0fc
net: remove unnecessary variables
V8 is smart enough to optimize the length property checking when
iterating over an array with a for loop.

PR-URL: https://github.com/nodejs/node/pull/8112
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-23 15:12:44 -04:00
James M Snell
9cee8b1b62 buffer: alias toLocaleString to toString
Make Buffer.prototype.toLocaleString an alias of Buffer.prototype.toString
so that the output is actually useful.

Fixes: https://github.com/nodejs/node/issues/8147
PR-URL: https://github.com/nodejs/node/pull/8148
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-08-23 10:59:39 -07:00
James M Snell
0764bc4711 Revert "crypto: add crypto.timingSafeEqual"
This reverts commit 0fc5e0dcd9.

Additional testing indicates that there may still be timing issues
with this implementation. Revert in order to give more time for
testing before this goes out into a release...

Refs: https://github.com/nodejs/node/pull/8040
Refs: https://github.com/nodejs/node/pull/8203
PR-URL: https://github.com/nodejs/node/pull/8225
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-08-23 10:52:32 -07:00
cjihrig
013d76cb73 dns: remove makeAsync() function check
makeAsync() is an internal method in the dns module. All of the
functions that call makeAsync() have already validated that the
callback is a function. This commit removes a redundant typeof
function check.

PR-URL: https://github.com/nodejs/node/pull/8170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
2016-08-22 11:07:05 -07:00
cjihrig
3a43568020 dns: lookupService() callback must be a function
lookupService() requires a callback function. This commit adds
a check to verify that the callback is actually a function.

PR-URL: https://github.com/nodejs/node/pull/8170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
2016-08-22 11:07:01 -07:00
Prince J Wesley
f6a74345d1
repl: Failed to save editor mode text in .save
Fixes: https://github.com/nodejs/node/issues/8142
PR-URL: https://github.com/nodejs/node/pull/8145
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-21 02:15:28 +05:30
cjihrig
ccbb3c78cd child_process: reuse existing no-op function
The internal/child_process module has an existing no-op
function. This commit utilizes that function, instead of
creating extraneous closures.

PR-URL: https://github.com/nodejs/node/pull/8164
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-08-20 16:24:44 -04:00
Santiago Gimeno
db6253f94a child_process: workaround fd passing issue on OS X
There's an issue on some `OS X` versions when passing fd's between processes.
When the handle associated to a specific file descriptor is closed by the sender
process before it's received in the destination, the handle is indeed closed
while it should remain opened. In order to fix this behaviour, don't close the
handle until the `NODE_HANDLE_ACK` is received by the sender.
Added `test-child-process-pass-fd` that is basically `test-cluster-net-send` but
creating lots of workers, so the issue reproduces on `OS X` consistently.

Fixes: https://github.com/nodejs/node/issues/7512
PR-URL: https://github.com/nodejs/node/pull/7572
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-20 10:58:28 +02:00
not-an-aardvark
0fc5e0dcd9 crypto: add crypto.timingSafeEqual
PR-URL: https://github.com/nodejs/node/pull/8040
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2016-08-19 19:36:05 -07:00
Evan Lucas
76007079ec Revert "repl,util: insert carriage returns in output"
This reverts commit fce4b981ea.

This was a breaking change and should have been marked semver-major.
The change that was made altered the output of util.format() and
util.inspect(). With how much those are used in the wild, this type of
change deserves more justification.

Fixes: https://github.com/nodejs/node/issues/8138
PR-URL: https://github.com/nodejs/node/pull/8143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-19 11:48:52 -05:00
Rich Trott
2e59ccecde assert: remove code that is never reached
The internal function `truncate()` is only called with the first
argument being the output of `util.inspect()`. `util.inspect()` calls
its own internal `formatValue()` which is guaranteed to return a string.

Therefore, we can remove the check in `truncate()` that the first
argument is a string as well as code to handle the case where it is not
a string.

PR-URL: https://github.com/nodejs/node/pull/8132
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Alexander Makarenko <estliberitas@gmail.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-08-18 16:50:16 -07:00
Guy Fraser
a9387db867 debugger: use arrow function for lexical this
Refs: https://github.com/nodejs/node/issues/7414
PR-URL: https://github.com/nodejs/node/pull/7415
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-08-18 16:44:38 -07:00
Ilkka Myller
1d0385f62d url: url.format() encodes all # in search
This commit fixes an error where only the first occurrence of `#` in
`search` parameter is URL encoded, and subsequent occurrences are not.

Also added a test for the case.

Fixes: https://github.com/nodejs/node/issues/8064
PR-URL: https://github.com/nodejs/node/pull/8072
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-18 11:21:19 -07:00
Calvin Metcalf
774146dc58 stream: avoid caching prepend check
This removes the cached check for EE.prototype.prependListener
because we can't have nice things. More specifically some
libraries will bundle their own event emitter implementation.

PR-URL: https://github.com/nodejs/node/pull/8018
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2016-08-17 18:47:41 -07:00
Sakthipriyan Vairamani
60dcd7323f tls: copy the Buffer object before using
`convertNPNProtocols` and `convertALPNProtocols' uses the `protocols`
buffer object as it is, and if it is modified outside of core, it
might have an impact. This patch makes a copy of the buffer object,
before using it.

PR-URL: https://github.com/nodejs/node/pull/8055
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2016-08-17 18:40:52 -07:00
Bryan English
249bb8da2f util: fix deprecated class prototype
Ensure the wrapped class prototype is exactly the unwrapped class
prototype, rather than an object whose prototype is the unwrapped
class prototype.

This ensures that instances of the unwrapped class are instances
of the wrapped class. This is useful when both a wrapped class and
a factory for the unwrapped class are both exposed.

Ref: https://github.com/nodejs/node/pull/8103
PR-URL: https://github.com/nodejs/node/pull/8105
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-17 18:27:22 -07:00
Prince J Wesley
4b883a3fb4
readline: keypress trigger for escape character
Fixes: https://github.com/nodejs/node/issues/7379
PR-URL: https://github.com/nodejs/node/pull/7382
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-08-17 23:44:39 +05:30
JungMinu
fce4b981ea repl,util: insert carriage returns in output
`\n` is not enough for Linux with some custom stream
add carriage returns to ensure that the output is displayed correctly
using `\r\n` should not be a problem, even on non-Windows platforms.

Fixes: https://github.com/nodejs/node/issues/7954
PR-URL: https://github.com/nodejs/node/pull/8028
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-13 23:03:30 +09:00
Saúl Ibarra Corretgé
6a3dbdacd6 udp: remove ancient check
PR-URL: https://github.com/nodejs/node/pull/8088
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-08-13 08:38:37 +01:00
Bartosz Sosnowski
08996fde3c fs: restore JS implementation of realpath
This reverts parts of b488b19eaf
restoring javascript implementation of realpath and realpathSync.

Fixes: https://github.com/nodejs/node/issues/7175
Fixes: https://github.com/nodejs/node/issues/6861
Fixes: https://github.com/nodejs/node/issues/7294
Fixes: https://github.com/nodejs/node/issues/7192
Fixes: https://github.com/nodejs/node/issues/7044
Fixes: https://github.com/nodejs/node/issues/6624
Fixes: https://github.com/nodejs/node/issues/6978
PR-URL: https://github.com/nodejs/node/pull/7899
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-08-12 13:07:55 +02:00
Aleksei Koziatinskii
f6070a1a02 deps: v8_inspector: console support
When node is running with --inspect flag, default console.log,
console.warn and other methods call inspector console methods in
addition to current behaviour (dump formatted message to stderr and
stdout). Inspector console methods forward message to DevTools and
show up in DevTools Console with DevTools formatters. Inspector
console methods not present on Node console will be added into it.

Only own methods on global.console object will be changed while in a
debugging session. User are still able to redefine it, use
console.Console or change original methods on Console.prototype.

PR-URL: https://github.com/nodejs/node/pull/7988
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
2016-08-11 17:40:42 -07:00
Jeremiah Senkpiel
ab3306ad51
tty: set the handle to blocking mode
Refs: https://github.com/nodejs/node/pull/1771
Refs: https://github.com/nodejs/node/issues/6456
Refs: https://github.com/nodejs/node/pull/6773
Refs: https://github.com/nodejs/node/issues/7743
PR-URL: https://github.com/nodejs/node/pull/6816
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-10 23:41:28 +02:00
Owen Smith
b7a8a691b4 events: unwrap #once listeners in #listeners
Fixes: https://github.com/nodejs/node/issues/6873
PR-URL: https://github.com/nodejs/node/pull/6881
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-09 14:13:09 -07:00
Jan Schär
1b99093df7 timers: remove unused repeat param in timer_wrap
The `repeat` param in `start(timeout, repeat)` was 0 in all callsites.

PR-URL: https://github.com/nodejs/node/pull/7994
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-09 12:26:10 -07:00