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

15366 Commits

Author SHA1 Message Date
James M Snell
1e4fafcb1a 2016-10-25, Version 7.0.0 (Current)
Notable Changes:

* Buffer
  * Passing invalid input to Buffer.byteLength will now throw an error [#8946](https://github.com/nodejs/node/pull/8946).
  * Calling Buffer without new is now deprecated and will emit a process warning [#8169](https://github.com/nodejs/node/pull/8169).
  * Passing a negative number to allocUnsafe will now throw an error [#7079](https://github.com/nodejs/node/pull/7079).
* Child Process
  * The fork and execFile methods now have stronger argument validation [#7399](https://github.com/nodejs/node/pull/7399).
* Cluster
  * The worker.suicide method is deprecated and will emit a process warning [#3747](https://github.com/nodejs/node/pull/3747).
* Deps
  * V8 has been updated to 5.4.500.36 [#8317](https://github.com/nodejs/node/pull/8317), [#8852](https://github.com/nodejs/node/pull/8852), [#9253](https://github.com/nodejs/node/pull/9253).
  * NODE_MODULE_VERSION has been updated to 51 [#8808](https://github.com/nodejs/node/pull/8808).
* File System
  * A process warning is emitted if a callback is not passed to async file system methods [#7897](https://github.com/nodejs/node/pull/7897).
* Intl
  * Intl.v8BreakIterator constructor has been deprecated and will emit a process warning [#8908](https://github.com/nodejs/node/pull/8908).
* Promises
  * Unhandled Promise rejections have been deprecated and will emit a process warning [#8217](https://github.com/nodejs/node/pull/8217).
* Punycode
  * The `punycode` module has been deprecated [#7941](https://github.com/nodejs/node/pull/7941).
* URL
  * An Experimental WHATWG URL Parser has been introduced [#7448](https://github.com/nodejs/node/pull/7448).

PR-URL: https://github.com/nodejs/node/pull/9099
2016-10-25 06:53:36 -07:00
Evan Lucas
2a654e4728 test: fix flaky test by removing timer
This fixes one of the tests that has been failing on CI on freebsd for
a bit by removing an unnecessary timer.

PR-URL: https://github.com/nodejs/node/pull/9199
Fixes: https://github.com/nodejs/node/issues/7929
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-10-25 08:07:16 -05:00
Ben Noordhuis
63c47e7189 src: remove superfluous env_string string
It's only used once at startup in a single place so create the string
in place instead of caching it for the lifetime of the isolate.

PR-URL: https://github.com/nodejs/node/pull/9213
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-25 13:38:14 +02:00
Ben Noordhuis
921d2b080e src: make cross-context MakeCallback() calls work
Check that invoking a callback on a receiver from a different context
works.

It ran afoul of an `env->context() == isolate->GetCurrentContext()`
assertion so retrieve the environment from the callback context and
the context to enter from the environment's context() method.

We could also have retrieved the environment from the receiver's context
and that would have made little practical difference.  It just seemed
more correct to get it from the callback context because that is the
actual execution context.

PR-URL: https://github.com/nodejs/node/pull/9221
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-10-25 13:18:01 +02:00
Ben Noordhuis
e4290dec2d src,tools: speed up startup by 2.5%
Use zero-copy external string resources for storing the built-in JS
source code.  Saves a few hundred kilobyte of memory and consistently
speeds up `benchmark/misc/startup.js` by 2.5%.

Everything old is new again!  Commit 74954ce ("Add string class that
uses ExternalAsciiStringResource.") from 2011 did the same thing but
I removed that in 2013 in commit 34b0a36 ("src: don't use NewExternal()
with unaligned strings") because of a limitation in the V8 API.

V8 no longer requires that strings are aligned if they are one-byte
strings so it should be safe to re-enable external strings again.

PR-URL: https://github.com/nodejs/node/pull/5458
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
2016-10-25 13:16:16 +02:00
Oliver Salzburg
2a456162b6 test: case sensitivity of env variables
Environment variables should be treated case-insensitive on Windows
platforms and case-sensitive on UNIX platforms.

This commit ensures this behavior persists.

Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9166
Fixes: https://github.com/nodejs/node/issues/9157
2016-10-25 11:35:47 +03:00
Oliver Salzburg
0a8d0eaa9b doc: mention case-insensitive env on windows
On Windows OS, environment variables are case-insensitive and are
treated likewise in NodeJS. This can be confusing and can lead
to hard-to-debug problems when moving code from one environment
to another.

Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/9166
Fixes: https://github.com/nodejs/node/issues/9157
2016-10-25 11:33:05 +03:00
cjihrig
dd13d71eb3 child_process: remove unreachable execSync() code
Code coverage showed that the execSync() variable inheritStderr
was never set to the default value of true. This is because
the default case is hit whenever normalizeExecArgs() returns an
object without an 'options' property. However, this can never
be the case because normalizeExecArgs() unconditionally creates
the options object. This commit removes the unreachable code.

PR-URL: https://github.com/nodejs/node/pull/9209
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: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-10-24 22:46:56 -04:00
cjihrig
a508000093 test: add coverage for execFileSync() errors
This commit adds coverage for errors returned by execFileSync()
when the child process exits with a non-zero code.

PR-URL: https://github.com/nodejs/node/pull/9211
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-24 18:35:36 -04:00
Ben Noordhuis
c5b07d4ec6 lib: fix beforeExit not working with -e
Commit 93a44d5 ("src: fix deferred events not working with -e") defers
evaluation of the script to the next tick.

A side effect of that change is that 'beforeExit' listeners run before
the actual script.  'beforeExit' is emitted when the event loop is
empty but process.nextTick() does not ref the event loop.

Fix that by using setImmediate().  Because it is implemented in terms
of a uv_check_t handle, it interacts with the event loop properly.

Fixes: https://github.com/nodejs/node/issues/8534
PR-URL: https://github.com/nodejs/node/pull/8821
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-10-24 23:12:47 +02:00
Ben Noordhuis
8e54c968e6 test: remove test-v8-inspector-json-protocol test
Remove parallel/test-v8-inspector-json-protocol, it duplicates the test
found in inspector/test-inspector.

PR-URL: https://github.com/nodejs/node/pull/9184
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 23:07:45 +02:00
Ben Noordhuis
3d9b379cd0 inspector: fix request path nullptr dereference
Fix a nullptr dereference when an invalid path is requested.

Regression introduced in commit 69fc85d ("inspector: generate UUID for
debug targets"), caught by Coverity.

PR-URL: https://github.com/nodejs/node/pull/9184
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 23:06:43 +02:00
Ben Noordhuis
678c094357 module: skip directories known not to exist
There is no point in trying to search for files in a directory that
we know does not exist, so stop doing that.

Reduces the total number of stat(2) calls and the number of stat(2)
misses on a medium-sized application by about 21% and 29% respectively.

Reduces the total number of package.json open(2) calls and the number
of open(2) misses by about 21% and 93% (!) respectively.

Before:

    % time     seconds  usecs/call     calls    errors syscall
    ------ ----------- ----------- --------- --------- ----------------
     50.93    0.178419          38      4702           lstat
     29.08    0.101875          36      2800      2010 stat
     11.36    0.039796          43       932       215 open
      5.39    0.018897          34       550           fstat
      3.24    0.011337          34       336           pread
    ------ ----------- ----------- --------- --------- ----------------
    100.00    0.350324                  9320      2225 total

After:

    % time     seconds  usecs/call     calls    errors syscall
    ------ ----------- ----------- --------- --------- ----------------
     55.49    0.176638          38      4702           lstat
     24.76    0.078826          35      2225      1435 stat
     10.19    0.032434          44       733        16 open
      6.19    0.019719          36       550           fstat
      3.37    0.010723          32       336           pread
    ------ ----------- ----------- --------- --------- ----------------
    100.00    0.318340                  8546      1451 total

PR-URL: https://github.com/nodejs/node/pull/9196
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 22:50:44 +02:00
Ben Noordhuis
df29d9f500 doc: add performance warning to require.extensions
Discourage using require.extensions because it slows down the module
loader.  The number of file system operations that the module system
has to perform in order to resolve a `require(...)` statement to a
filename is proportional to the number of registered extensions.

PR-URL: https://github.com/nodejs/node/pull/9196
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 22:50:41 +02:00
Ben Noordhuis
8fca311857 test: add more module loader test coverage
Verify that a package.json without a .main property loads index.js.

PR-URL: https://github.com/nodejs/node/pull/9196
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 22:48:43 +02:00
Ben Noordhuis
d1f7c965bb test: make flaky pummel test more reliable
Increase the number of iterations from 1e4 to 1e5.  Makes the test pass
for me locally when previously it would fail 9 out of 10 times because
the running time was not enough to smooth away the outliers.

Fixes: https://github.com/nodejs/node/issues/8744
PR-URL: https://github.com/nodejs/node/pull/9241
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: not-an-aardvark <not-an-aardvark@users.noreply.github.com>
2016-10-24 22:44:45 +02:00
Ben Noordhuis
1b8fca16bc test: move flaky test to test/pummel
Move sequential/test-crypto-timing-safe-equal-benchmarks to test/pummel
because it fails for me locally quite frequently and because it takes
about five or six seconds to complete, which is too long for a test in
test/sequential.

Fixes: https://github.com/nodejs/node/issues/8744
PR-URL: https://github.com/nodejs/node/pull/9241
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: not-an-aardvark <not-an-aardvark@users.noreply.github.com>
2016-10-24 22:43:39 +02:00
Ben Noordhuis
ceb6023260 src: clean up program/isolate/env init logic
Reorder the initialization logic so that program-wide, per-isolate and
per-environment initialization is more cleanly separated.

PR-URL: https://github.com/nodejs/node/pull/9224
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 22:38:39 +02:00
Ben Noordhuis
d77e818a54 src: simplify code, remove NodeInstanceData
NodeInstanceData is not used meaningfully and makes the initialization
logic harder to follow.  Let's remove it and delete 100 lines of code
in one fell swoop.

PR-URL: https://github.com/nodejs/node/pull/9224
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 22:35:43 +02:00
Ben Noordhuis
d52f5dc864 src: speed up module loading, don't resize buffer
Don't bother shrinking the read buffer on the final read because we
dispose it immediately afterwards.  Avoids some unnecessary memory
allocation and copying.

PR-URL: https://github.com/nodejs/node/pull/9132
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 22:31:07 +02:00
Ben Noordhuis
35e8896153 src: speed up module loading, skip EOF read
Stop reading from disk when we read fewer bytes than requested because
the next read will be the zero-sized EOF.

PR-URL: https://github.com/nodejs/node/pull/9132
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 22:30:43 +02:00
Marc Udoff
d3b1a2b4dd src: add NODE_PRESERVE_SYMLINKS environment variable
Add a way through environment variables to set the --preserve-symlinks
flag. Any non-null value of NODE_PRESERVE_SYMLINKS will enable symlinks.

PR-URL: https://github.com/nodejs/node/pull/8749
Fixes: https://github.com/nodejs/node/issues/8509
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-10-24 22:13:08 +03:00
Michaël Zasso
929979d9d7 deps: update V8 to 5.4.500.36
PR-URL: https://github.com/nodejs/node/pull/9253
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-24 11:24:59 -07:00
Gibson Fahnestock
5532a7adec doc: change os x tag to macos
PR-URL: https://github.com/nodejs/node/pull/9009
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-10-24 07:14:04 -07:00
Gibson Fahnestock
e8c9f6f0be doc: change solaris tag to smartos
PR-URL: https://github.com/nodejs/node/pull/9009
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-10-24 07:14:00 -07:00
Gibson Fahnestock
ab9b2fdbfb doc: add teams for platform-specific issues
Specifies teams to cc for platform specific issues

 - Existing teams: @nodejs/platform-arm, @nodejs/platform-freebsd, and
@nodejs/platform-windows
 - New teams: @nodejs/platform-s390, @nodejs/platform-aix
 - Changed name: @nodejs/platform-solaris -> @nodejs/platform-smartos

PR-URL: https://github.com/nodejs/node/pull/9009
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-10-24 07:13:53 -07:00
Gibson Fahnestock
c659c9d2ab doc: add s390 and ppc architecture labels
Adds `s390` and `ppc` as Arch labels, and `aix` as an OS label.
PR-URL: https://github.com/nodejs/node/pull/9009
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-10-24 07:13:46 -07:00
Rod Machen
dcc9386183 doc: fixes formatting in process
Fixes several formatting errors in the process doc, including missing
link references, misplaced underscores, and a missing backtick.

Fixes: https://github.com/nodejs/node/issues/9223
PR-URL: https://github.com/nodejs/node/pull/9235
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-10-24 07:05:48 -07:00
Michaël Zasso
6031d8e76e tools: enable ES2016 syntax support in ESLint
This allows us to use the exponentiation operator.

PR-URL: https://github.com/nodejs/node/pull/9218
Ref: https://github.com/nodejs/node/pull/9208#issuecomment-255309920
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-10-24 14:02:31 +02:00
Brian White
6e5389eb5a
deps: revert default gtest reporter change
PR-URL: https://github.com/nodejs/node/pull/8948
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-23 04:34:07 -04:00
Rich Trott
5d818ccc22 test: fix flaky test-timers-blocking-callback
This test was failing on FreeBSD from time to time in the project CI.
The bug the test was written for would guarantee that the timer would
fire at least 100ms late, but the assertion was firing if it was more
than 50ms late.

This changes the assertion to fire when the timer is more than 100ms
late.

I ran a modified version of this test using 0.10.38 (which has the bug)
and 0.10.39 (which has the fix) to confirm that it still fails in the
buggy one and passes in the fixed one.

PR-URL: https://github.com/nodejs/node/pull/9198
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
2016-10-21 16:28:41 -07:00
Rich Trott
f99e698855 test: remove arbitrary timer
`test-dgram-send-callback-buffer-length` was timing out (via the
200ms timeout in the code) on FreeBSD in CI. The 200ms timeout is
arbitrary and not necessary. Remove it.

PR-URL: https://github.com/nodejs/node/pull/9197
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-10-21 16:25:14 -07:00
Jeremiah Senkpiel
f1a3755cd1 doc: improve header styling for API docs
Sizes were mostly decided by using http://type-scale.com/
with the 1.250 "Major Third" scaling.

PR-URL: https://github.com/nodejs/node/pull/8811
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Phillip Johnsen <johphi@gmail.com>
2016-10-21 22:01:40 +01:00
Kyle E. Mitchell
e8fadd8da5 fs: clarify fs.link and fs.linkSync arguments
Updates the argument names `srcpath` and `dstpath` to match the more
descriptive `existingPath` and `newPath` in the documentation.

PR-URL: https://github.com/nodejs/node/pull/9145
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-10-21 08:01:16 -07:00
Kyle E. Mitchell
6f7cdf7ef0 doc: clarify fs.link and fs.linkSync arguments
Clarifies documentation by replacing the argument names `srcpath`
and `dstpath` with more descriptive `existingPath` and `newPath`,
reflecting how POSIX describes `link()`.

PR-URL: https://github.com/nodejs/node/pull/9145
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-10-21 08:01:07 -07:00
Rich Trott
3dbf900e85 tools: replace custom lint rule for getter/setter
Replace custom `no-definegetter-definesetter` lint rule with ESLint's
built-in `no-restricted-properties`.

Refs: https://github.com/nodejs/node/pull/9112#pullrequestreview-4378536
PR-URL: https://github.com/nodejs/node/pull/9194
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-10-21 07:37:10 -07:00
Rich Trott
3184285630 test: remove duplicate required module
`common` is required twice in test-setproctitle.js. Remove one of the
instances.

Other refactoring:

* var -> const and let
* assert.equal -> assert.strictEqual
* assert.notEqual -> assert.notStrickEqual
* string concatenation -> template string
* use of assert.ifError() instead of asserting error is null

PR-URL: https://github.com/nodejs/node/pull/9169
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>
2016-10-20 22:55:09 -07:00
Eugene Ostroukhov
da184f4f33 inspector: no URLs when the debugger is connected
By convention, inspector protocol targets do not advertise connection
URLs when the frontend is already connected as multiple inspector
protocol connections are not supported.

PR-URL: https://github.com/nodejs/node/pull/8919
Reviewed-By: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-20 13:17:36 -07:00
Trevor Norris
7bffe23da0
buffer: fix range checks for slice()
Using the black magic of Symbol.toPrimitive the numeric value of
start/end can be changed when Uint32Value() is called once
Buffer::Fill() is entered. Allowing the CHECK() to be bypassed.

The bug report was only for "start", but the same can be done with
"end". Perform checks for both in node::Buffer::Fill() to make sure the
issue can't be triggered, even if process.binding is used directly.

Include tests for each case. Along with a check to make sure the last
time the value is accessed returns -1. This should be enough to make
sure Buffer::Fill() is receiving the correct value. Along with two tests
against process.binding directly.

Fixes: https://github.com/nodejs/node/issues/9149
PR-URL: https://github.com/nodejs/node/pull/9174
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <ranziska.hinkelmann@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-20 13:40:47 -06:00
Evan Lucas
6845d6e318 tools: fix release script on macOS 10.12
Previously, we were relying on the output of gpg from git tag -v to
verify that the key selected by the releaser is the key that was used
to sign the tag. This output can change depending on the version of git
being used. Now, we just check that the output of git tag -v contains
the key selected.

Fixes: https://github.com/nodejs/node/issues/8822
PR-URL: https://github.com/nodejs/node/pull/8824
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-10-20 09:57:43 -07:00
Franziska Hinkelmann
8f8f0313f4 test: add regression test for instanceof
Add regression test for issue
https://github.com/nodejs/node/issues/7592.
The issue was fixed in upstream V8 and this test case was
previously added with a manual cherry pick for v6.x.

Related to: https://github.com/nodejs/node/pull/7638 and
https://github.com/nodejs/node/issues/7592.

PR-URL: https://github.com/nodejs/node/pull/9178
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-20 14:10:34 +02:00
Rich Trott
68ba9aa0fb test,lib,benchmark: match function names
In most cases, named functions match the variable or property to which
they are being assigned. That also seems to be the practice in a series
of PRs currently being evaluated that name currently-anonymous
functions.

This change applies that rule to instances in the code base that don't
comply with that practice.

This will be enforceable with a lint rule once we upgrade to ESLint
3.8.0.

PR-URL: https://github.com/nodejs/node/pull/9113
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2016-10-19 22:20:27 -07:00
Myles Borins
4b65a65e75 2016-10-19, Version 6.9.1 'Boron' (LTS) Release
Notable changes:

* streams: Fix a regression introduced in v6.8.0 in readable stream
that caused unpipe to remove the wrong stream (Anna Henningsen)

PR-URL: https://github.com/nodejs/node/pull/9186
2016-10-19 23:30:15 +01:00
Michael Dawson
30f9790701 doc: add CTC meeting minutes for 2016-10-12
PR-URL: https://github.com/nodejs/node/pull/9070
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-19 18:11:19 -04:00
Rich Trott
15b4642264 doc: remove confusing reference in governance doc
At the CTC meeting today, Sakthipriyan noted that there was a link to
the CTC consensus material from the pull request consensus material. The
link was confusing because the CTC consensus material is
meeting-specific, which does not apply to pull requests. I have removed
that link and replaced it with a text explanation.

PR-URL: https://github.com/nodejs/node/pull/9073
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-19 14:38:02 -07:00
Jeremiah Senkpiel
252cc3d00b doc: v6 is now LTS rather than Current
PR-URL: https://github.com/nodejs/node/pull/9182
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-10-19 19:26:31 +01:00
Jeremiah Senkpiel
e44eb0e6ce doc: fix some table problems in changelog.md
PR-URL: https://github.com/nodejs/node/pull/9183
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-10-19 19:18:18 +01:00
Daniel Bevenius
09d41e22cc test: rename target to exports for consistency
The doc/api/addons.md document contains examples of Addon
Initialization functions that take a parameter named exports.
This also matches the name used in node.cc when calling:
mp->nm_register_func(exports, module, mp->nm_priv);

Currently, a number of the tests name this same parameter target. This
commit renames target to exports for consistency.

PR-URL: https://github.com/nodejs/node/pull/9135
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-10-19 19:57:02 +02:00
Miguel Angel Asencio Hurtado
ef030da818 assert: name anonymous functions
Ref: https://github.com/nodejs/node/issues/8913
PR-URL: https://github.com/nodejs/node/pull/9051
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-19 08:57:20 -07:00
Myles Borins
1aa15da92a doc: suggest nodejs/help for general support
This commit adds a reference to `nodejs/help` in the github template.

PR-URL: https://github.com/nodejs/node/pull/9128
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-10-19 08:48:25 -07:00