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

12468 Commits

Author SHA1 Message Date
Michaël Zasso
d1a2e5357e gitignore: don't ignore debug source directory in V8
On case-insensitive platforms, the Debug/ rule catches it.

PR-URL: https://github.com/nodejs/node/pull/3351
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-10-14 11:20:33 -07:00
Steven R. Loomis
a441aa6e1d doc: update WORKING_GROUPS.md to include Intl
* Intl was missing

Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3251
2015-10-14 11:16:43 -07:00
Myles Borins
6c032a8333 test: replace util with backtick strings
Now that we have backticks we no longer need to use util.format
to template strings!

This commit was inspired by #3324, and it replaces instances of
util.format with backtick strings in a number of tests

Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3359
2015-10-14 10:02:47 -07:00
Fedor Indutny
ab03635fb1 http: fix stalled pipeline bug
This is a two-part fix:

- Fix pending data notification in `OutgoingMessage` to notify server
  about flushed data too
- Fix pause/resume behavior for the consumed socket. `resume` event is
  emitted on a next tick, and `socket._paused` can already be `true` at
  this time. Pause the socket again to avoid PAUSED error on parser.

Fix: https://github.com/nodejs/node/issues/3332
PR-URL: https://github.com/nodejs/node/pull/3342
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-10-14 12:16:18 -04:00
Julien Gilli
f45c315763 test: fix domain with abort-on-uncaught on PPC
Add SIGTRAP and the corresponding exit code to the list of signals/exit
codes that are expected when running tests that throw an uncaught error
and have --abort-on-uncaught-exception enabled.

Also refactor a bit related comments so that they better reflect what's
actually happening.

Fixes #3239.

PR: #3354
PR-URL: https://github.com/nodejs/node/pull/3354
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-10-13 22:56:47 -07:00
Fábio Santos
85b74de9de stream: fix signature of _write() in a comment
This comment was a bit misleading, since it was missing the `encoding`
argument.

PR-URL: https://github.com/nodejs/node/pull/3248
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
2015-10-13 22:32:21 -07:00
Timothy Gu
81503e597b doc: fix typo in changelog
PR-URL: https://github.com/nodejs/node/pull/3353
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-10-14 13:35:26 +11:00
Rich Trott
e3d9d25083 test: add test-child-process-emfile fail message
When the test fails (as it does frequently on FreeBSD unfortunately)
provide a non-cryptic error message that also provides a line number.

PR-URL: https://github.com/nodejs/node/pull/3335
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-13 18:27:47 -07:00
Brian White
2d3560767e src: fix exception message encoding on Windows
The printf family of functions do not properly display UTF8
strings well on Windows. Use the appropriate wide character
API instead if stderr is a tty.

PR-URL: https://github.com/nodejs/node/pull/3288
Fixes: https://github.com/nodejs/node/issues/3284
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-10-13 18:10:27 -04:00
James M Snell
0a7076b0f1 2015-10-13, Version 4.2.1 'Argon' (LTS) Release
* Includes fixes for two regressions
  - Assertion error in WeakCallback  - see [#3329](https://github.com/nodejs/node/pull/3329)
  - Undefined timeout regression - see [#3331](https://github.com/nodejs/node/pull/3331)

* Document an additional known issue with pipelined requests
  - See: https://github.com/nodejs/node/issues/3332 and https://github.com/nodejs/node/pull/3342
2015-10-13 10:39:14 -07:00
Rod Vagg
4bc9d97c5f doc: label v4.2.0 as LTS in changelog heading
Update the label for v4.2.0 to (LTS) from (Stable)

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3343
2015-10-13 08:26:33 -07:00
Liang-Chi Hsieh
ff877e93e1 src: fix stuck debugger process
The debug process running "node debug a.js" will be stuck when the
script ends. This is because the debug handler has been unrefed.
We shouldn't unref the debug handler to avoid this problem.

PR-URL: https://github.com/nodejs/node/pull/2778
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-13 12:58:36 +02:00
Rich Trott
6f14b3a7db test: remove util from common
util is loaded just for one use of util.format(). Replace it with a
string template. While we're at it, delete nearby lengthy comment
justifying use of fs.readFileSync().

PR-URL: https://github.com/nodejs/node/pull/3324
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed By: Evan Lucas <evanlucas@me.com>
2015-10-12 21:08:53 -07:00
Fedor Indutny
931118c9d7 buffer: fix assertion error in WeakCallback
`CallbackInfo` is now bound to `ArrayBuffer` instance, not `Uint8Array`,
therefore `SPREAD_ARG` will abort with:

    Assertion failed: ((object)->IsUint8Array())

Make changes necessary to migrate it to `ArrayBuffer`.

See: https://github.com/nodejs/node/pull/3080#issuecomment-147502167

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3329
2015-10-12 20:47:10 -07:00
Rich Trott
7d94611ac9 test: split up buffer tests for reliability
The Pi 1's in CI don't always fail on the buffer.toString() tests. But
they time out sometimes, so let's split the tests up so they don't.

PR-URL: https://github.com/nodejs/node/pull/3323
Reviewed By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed By: Trevor Norris <trev.norris@gmail.com>
2015-10-12 20:28:33 -07:00
Ryan Graham
bde32f8a4d lib: fix undefined timeout regression
63644dd1cd introduced a regression caused by everyone's favourite
JavaScript feature: undefined < 0 === undefined >= 0.

Add a case to the existing tests to cover this scenario and then add
the check for undefined that makes the test pass.

PR-URL: https://github.com/nodejs/node/pull/3331
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed By: Evan Lucas <evanlucas@me.com>
2015-10-12 19:25:14 -04:00
James M Snell
47db2472e5 2015-10-12, Version 4.2.0 'Argon' (LTS) Release
The first Node.js LTS release! See https://github.com/nodejs/LTS/
for details of the LTS process.

* **icu**: Updated to version 56 with significant performance improvements
  (Steven R. Loomis) https://github.com/nodejs/node/pull/3281
* **node**:
  - Added new `-c` (or `--check`) command line argument for checking script
    syntax without executing the code (Dave Eddy) https://github.com/nodejs/node/pull/2411
  - Added `process.versions.icu` to hold the current ICU library version
    (Evan Lucas) https://github.com/nodejs/node/pull/3102
  - Added `process.release.lts` to hold the current LTS codename when the
    binary is from an active LTS release line (Rod Vagg) https://github.com/nodejs/node/pull/3212
* **npm**: Upgraded to npm 2.14.7 from 2.14.4, see release notes:
  https://github.com/npm/npm/releases/tag/v2.14.7 for full details (Kat Marchán) https://github.com/nodejs/node/pull/3299

PR-URL: https://github.com/nodejs/node/pull/3258
2015-10-12 11:17:37 -07:00
Fedor Indutny
51325c03d4 tls: use parent handle's close callback
When closing the child TLSWrap handle - wait for the proper parent's
handle close callback invocation. `uv_close_cb` may be invoked much
later than the next libuv tick, depending on the platform.

The only platform that currently seem to defer `uv_close_cb` is Windows
XP. This behavior was not observed on other Windows systems, and is not
possible on Unixes.

Fix: https://github.com/nodejs/node/issues/2979
PR-URL: https://github.com/nodejs/node/pull/2991
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-12 13:26:51 -04:00
Trevor Norris
a713024579 net: don't throw on bytesWritten access
If bytesWritten is accessed before the object has been properly
constructed then return undefined.

Fixes: https://github.com/nodejs/node/issues/3298
PR-URL: https://github.com/nodejs/node/pull/3305
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-12 08:29:30 -06:00
Rich Trott
3202456baa test: remove util properties from common
common does not need util properties anymore. Remove them.

PR-URL: https://github.com/nodejs/node/pull/3304
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-10-11 22:09:40 -07:00
Brian White
68990948fe stream: avoid pause with unpipe in buffered write
If a pipe is cleaned up (due to unpipe) during a write that
returned false, the source stream can get stuck in a paused state.

Fixes: https://github.com/nodejs/node/issues/2323
PR-URL: https://github.com/nodejs/node/pull/2325
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-10-11 14:07:25 -04:00
David Boivin
8e213096df doc: update the assert module summary
The current wording "This module is used for writing unit tests for your
applications, you can access it with require('assert')." implies that
this module should only be used in development while unit testing.

The article "Error Handling in Node.js" by Joyent
(https://www.joyent.com/developers/node/design/errors) uses the assert
module in an efficient way to validate required function arguments.

PR-URL: https://github.com/nodejs/node/pull/2799
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-11 19:24:39 +02:00
reggi
3ef2e4acf3 doc: fix typos in changelog
PR-URL: https://github.com/nodejs/node/pull/3291
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-10-11 18:55:06 +02:00
Roman Klauke
0474bf57d9 doc: replace node-gyp link with nodejs/node-gyp
The node-gyp is now in the nodejs/node-gyp. This commit replaces the
repository owner link with the new nodejs/node-gyp link.

PR-URL: https://github.com/nodejs/node/pull/3320
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-10-11 17:03:30 +02:00
Rich Trott
31c971d641 test: parallelize long-running test
Fixes a persistently troublesome failing test by splitting it
out into multiple parallel tests.

Reviewed By: Evan Lucas <evanlucas@me.com>
Reviewed By: Trevor Norris <trev.norris@gmail.com>
Reviewed By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3287
2015-10-10 17:28:27 -07:00
Balázs Galambosi
b9279aa193 doc: remove old note, 'cluster' is marked stable
Fixes: https://github.com/nodejs/node/issues/3313
PR-URL: https://github.com/nodejs/node/pull/3314
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-10-10 13:37:15 -07:00
Karl Skomski
9148114c93 src: convert BE-utf16-string to LE before search
On Big Endian platforms v8 strings are need to converted
to Little Endian before searching in utf16le buffer

Fixes: https://github.com/nodejs/node/issues/3283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ca.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/3295
2015-10-10 10:18:45 -07:00
Kat Marchán
aff3acf268 deps: upgrade to npm 2.14.7
PR-URL: https://github.com/nodejs/node/pull/3299
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-10-09 18:50:00 -07:00
Rich Trott
ead5cd990c test: test util rather than common
test-sys.js tests common.inspect() (which is test-specific code) and not
sys (which, although deprecated, should still be tested).

This commit moves the tests to the not-deprecated util and adds a test
to check that deprecated sys and util are the same.

PR-URL: https://github.com/nodejs/node/pull/3256
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-10-09 14:45:47 -07:00
Trevor Norris
e97dae573c buffer: don't abort on prototype getters
Accessing prototype properties directly on a typed array will throw. So
do an extra check in Buffer's own getters to verify it is being called
on an instance.

Fixes: https://github.com/nodejs/node/issues/3297
PR-URL: https://github.com/nodejs/node/pull/3302
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-10-09 15:42:23 -06:00
Jason Karns
775c01e3aa doc: recommend Infinity on emitter.setMaxListeners
Instead of recommending `0` as the magic value to set max listeners to
unlimited, recommend `Infinity`. This paves the way for `0` as a magic
value eventually being deprecated and finally removed.

PR-URL: https://github.com/nodejs/node/pull/2559
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-09 19:01:29 +02:00
Dave Hodder
048c8f2c4b doc: Amend capitalization of word JavaScript
PR-URL: https://github.com/nodejs/node/pull/3285
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-09 18:42:58 +02:00
Alejandro Oviedo
2146f62065 doc: add method links in child_process.markdown
Added links to referenced methods.

PR-URL: https://github.com/nodejs/node/pull/3186
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-09 18:41:09 +02:00
Alejandro Oviedo
70c78c9469 doc: add method links in dns.markdown
Added links to referenced methods.

PR-URL: https://github.com/nodejs/node/pull/3196
Reviewed-By: Roman Reiss <me@silverwind.io>>
2015-10-09 18:39:11 +02:00
Rich Trott
72c8a74b55 test: remove common.inspect()
common.inspect() is just util.inspect(). common copies every property
from util but this is the only one that gets used and it only gets used
in three places. Well, four, but the fourth is removed in a pending PR.

This commit removes it. Subsequently, the "copy util to common"
part of `common` can be removed altogether.

PR-URL: https://github.com/nodejs/node/pull/3257
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-10-08 22:35:24 -07:00
Rich Trott
a1040f2065 test: refresh temp directory when using pipe
common.PIPE resides in the temp directory (except on Windows). Insure
that the temp directory is refreshed in tests that use common.PIPE.

PR-URL: https://github.com/nodejs/node/pull/3231
Fixes: https://github.com/nodejs/node/issues/3227
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-10-08 20:05:22 -07:00
Rich Trott
47befffc53 lib,test: deprecate _linklist
Deprecate _linklist and add test to confirm internal linklist and
public _linklist are the same.

PR-URL: https://github.com/nodejs/node/pull/3078
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-10-08 17:32:08 -07:00
Steven R. Loomis
01908d0a9a build: Intl: deps: bump ICU to 56.1 (GA)
* ICU 56 was just released yesterday. Update to it.
* Notable changes: Unicode 8, CLDR 28, 2-3x number format perf,
  20% improvement in Collator startup
  * more at http://site.icu-project.org/download/56 or in #2917

Also:

* cleanup out/**/*.d and deps/icu  on "make clean"
* cleanup deps/icu on "vcbuild clean"

When building from an non-clean directory, it's important to
run `make clean` or `vcbuild clean` to remove the existing
ICU 55 from the deps path before building.

Fixes: https://github.com/nodejs/node/issues/2917
PR-URL: https://github.com/nodejs/node/pull/3281
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-10-08 14:20:36 -07:00
Junliang Yan
8aa589c069 test: Fix test-fs-read-stream-fd-leak race cond
Fix intermittent test failure on slower machines.
Gives test longer time to complete but checks
at regular intervals so that the test only
runs longer on slower machines or in the failure
case.

PR-URL: https://github.com/nodejs/node/pull/3218
Fixes: https://github.com/nodejs/node/issues/3215
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James Snell <jasnell@gmail.com>>
2015-10-08 16:31:16 -04:00
Trevor Norris
178ac3367f js_stream: prevent abort if isalive doesn't exist
Attempting to check IsAlive() on a JSStream before the isAlive()
callback can be set in JS causes a CHECK to fail in MakeCallback.
Instead return false if the callback hasn't been set.

PR-URL: https://github.com/nodejs/node/pull/3282
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-10-08 11:38:21 -06:00
Ben Noordhuis
ded4f91eef assert: support arrow functions in .throws()
`x instanceof f` where f is an arrow function throws a (spec-conforming)
"Function has non-object prototype 'undefined' in instanceof check"
exception.

Add a workaround so that it's possible to pass arrow functions as the
second argument to assert.throws().  The try/catch block is a little
jarring but swapping around the clauses in the if statements changes
the semantics too much.

Fixes: https://github.com/nodejs/node/issues/3275
PR-URL: https://github.com/nodejs/node/pull/3276
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2015-10-08 19:26:01 +02:00
Karl Skomski
ccaaae9d0c src: fix u-a-free if uv returns err in ASYNC_CALL
PR-URL: https://github.com/nodejs/node/pull/3049
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-08 19:25:47 +02:00
Junliang Yan
a9d42e0131 test: fix losing original env vars issue
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/3190
2015-10-08 07:51:46 -07:00
Johan Bergström
a214905ff4 build: make icu download path customizable
This makes it easier to store icu tarballs outside of the node.js
directory which is useful in our CI where git directories are
scrubbed between runs.

PR-URL: https://github.com/nodejs/node/pull/3200
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-10-08 22:00:09 +11:00
Doug Shamoo
35cdded744 doc: add help repo link to CONTRIBUTING.md
Direct help requests and technical issues that are not issues with
Node.js to the nodejs help repo issue tracker. Add link.

PR-URL: https://github.com/nodejs/node/pull/3233
Fixes: https://github.com/nodejs/node/issues/3185
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-10-07 22:01:00 -07:00
Karl Skomski
a18dd7b788 src: replace naive search in Buffer::IndexOf
Adds the string search implementation from v8
which uses naive search if pattern length < 8
or to a specific badness then uses Boyer-Moore-Horspool

Added benchmark shows the expected improvements
Added option to use ucs2 encoding with Buffer::IndexOf

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2539
2015-10-07 21:09:53 -07:00
Trevor Norris
aeee956ac7 async_wrap: correctly pass parent to init callback
Previous logic didn't allow parent to propagate to the init callback
properly. The fix now allows the init callback to be called and receive
the parent if:

- async wrap callbacks are enabled and parent exists
- the init callback has been called on the parent and an init callback
  exists then it will be called regardless of whether async wrap
  callbacks are disabled.

Change the init/pre/post callback checks to see if it has been properly
set. This allows removal of the Environment "using_asyncwrap" variable.

Pass Isolate to a TryCatch instance.

Fixes: https://github.com/nodejs/node/issues/2986
PR-URL: https://github.com/nodejs/node/pull/3216
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-10-07 13:27:46 -06:00
Roman Reiss
07a84191c0 doc: add TLS session resumption example
Using TLS session resumption correctly is not obvious. This added
example code should help new users understand how to use it correctly.

Related issue: https://github.com/nodejs/node/issues/3132
PR-URL: https://github.com/nodejs/node/pull/3147
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-10-07 20:50:47 +02:00
Jérémy Lal
17665af02f build: add --with-arm-fpu option
Fixes: https://github.com/nodejs/node/issues/2942
PR-URL: https://github.com/nodejs/node/pull/3228
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-10-07 20:47:40 +02:00
Rich Trott
099cfbc58c test: remove deprecated error logging
common.error() is just deprecated util.error() renamed.
Remove calls to it and some other extraneous console logging
in tests.

PR-URL: https://github.com/nodejs/node/pull/3079
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-10-07 11:13:38 -07:00