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

13764 Commits

Author SHA1 Message Date
Anna Henningsen
9c2b8ecc54
doc: note that zlib.flush acts after pending writes
Describe that `zlib.flush()` may wait for pending writes and
until output is being read from the stream.

Fixes: https://github.com/nodejs/node/issues/3782
PR-URL: https://github.com/nodejs/node/pull/6172
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
2016-04-20 18:28:39 +02:00
Santiago Gimeno
2dc5ad460a test: move more tests from sequential to parallel
Only `test-stdin-from-file.js` has been modified so that the `stdin.txt`
is written in a temp directory instead of the `fixtures` directory.

PR-URL: https://github.com/nodejs/node/pull/6187
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-20 09:14:33 -07:00
cjihrig
54dd7c38e5 net: set ADDRCONFIG DNS hint in connections
b85a50b6da removed the implicit
setting of DNS hints when creating a connection. This caused some
of the pi2 machines to become flaky. This commit restores the
implicit dns.ADDRCONFIG hint, but not dns.V4MAPPED.

Fixes: https://github.com/nodejs/node/issues/6133
PR-URL: https://github.com/nodejs/node/pull/6281
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-04-20 12:04:39 -04:00
Anna Henningsen
29ca969651
child_process: add nullptr checks after allocs
Add `CHECK_NE(·, nullptr)` after allocations made when
spawning child processes.

PR-URL: https://github.com/nodejs/node/pull/6256
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-20 18:03:54 +02:00
surya panikkal
aa4d2ae897 test: assert - fixed error messages to match the tests
PR-URL: https://github.com/nodejs/node/pull/6241
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-04-20 08:57:23 -07:00
Anna Henningsen
f8e507eaf1
test: add zlib close-after-error regression test
Add a regression test based on the report in
https://github.com/nodejs/node/issues/6034.

PR-URL: https://github.com/nodejs/node/pull/6270
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-20 17:43:27 +02:00
Rich Trott
4faaed69fa test,tools: enable linting for undefined vars
The test directory had linting for undefined variables disabled. It is
enabled everywhere else in the code base. Let's disable the fule for
individual lines in the handful of tests that use undefined variables.

PR-URL: https://github.com/nodejs/node/pull/6255
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-04-20 08:38:41 -07:00
Rich Trott
8ede3d5002 tools: lint rule for assert.fail()
`assert.fail()` is often mistakenly used with a single argument even in
Node.js core. (See fixes to previous instances in
b7f4b1ba4c,
28e9a022df. and
676e61872f54dd546e324599c7871c20b798386a.)

This commit adds a linting rule to identify instances of this issue.

PR-URL: https://github.com/nodejs/node/pull/6261
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-20 08:36:27 -07:00
Rich Trott
4bbd41864a tools: enable linting for v8_prof_processor.js
`lib/internal/v8_prof_processor.js` was being excluded from linting, but
the only lint issue it has is that it cannot run in strict mode. Disable
the `strict` rule with a comment and remove the file from
`.eslintignore`.

PR-URL: https://github.com/nodejs/node/pull/6262
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-20 08:33:59 -07:00
Brian White
e9dc6306ca url: use "empty" object for empty query strings
This makes things consistent with the way that the querystring
module creates parsed results.

PR-URL: https://github.com/nodejs/node/pull/6289
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-20 08:26:06 -07:00
Ali Ijaz Sheikh
4fbd375724 deps: upgrade to V8 5.0.71.33
This picks up the fix for harmony-regexp-properties being enabled
without a flag.

V8-Commit: https://github.com/v8/v8/commit/27ac008
Fixes: https://github.com/nodejs/node/issues/6251
PR-URL: https://github.com/nodejs/node/pull/6290
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: ChALkeR - Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
2016-04-20 08:07:24 -07:00
Michael Dawson
0899ea7a52 deps: exclude tests on ppc for v8 5.0
There were 2 issues which either the v8 team was reluctant to
backport the fix because the fix was for a disabled feature (wasm) or
that we did not have time to investigate before 5.0 was cut
which result in v8 test failures for PPC in 5.0.  These are test
issues and are already resolved in v8 master.  This PR
excludes these tests so that our v8 tests in the CI will
be green so that we can detect any real regressions.

PR-URL: https://github.com/nodejs/node/pull/6267
Fixes: https://github.com/nodejs/node/issues/6236
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-19 23:00:03 -04:00
Gibson Fahnestock
7fc4b31051 build: fix make tar-headers for Linux
The tar-headers target tries to find and delete links in the
tar folder, which fails as no links are found. Use rm -f to
avoid this.

Remove the config.gypi dependency, as the target runs configure
itself.

PR-URL: https://github.com/nodejs/node/pull/5978
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-19 22:48:15 -04:00
Sakthipriyan Vairamani
697790c117 src: fix -Wunused-result warning in e38bade
This patch fixes the warning introduced by the changes in e38bade.

Ref: https://github.com/nodejs/node/pull/6092
PR-URL: https://github.com/nodejs/node/pull/6276
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-04-19 21:40:31 +05:30
Josh Leder
0ecc430894 test: add test for responses to HTTP CONNECT req
See: https://github.com/nodejs/node/pull/6198
PR-URL: https://github.com/nodejs/node/pull/6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-19 11:48:09 -04:00
Fedor Indutny
9d4d529517 http: skip body and next message of CONNECT res
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.

Fix: https://github.com/nodejs/node/pull/6198
PR-URL: https://github.com/nodejs/node/pull/6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-19 11:48:06 -04:00
Fedor Indutny
7f14483352 deps: update to http-parser 2.7.0
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.

See: https://github.com/nodejs/node/pull/6198
PR-URL: https://github.com/nodejs/node/pull/6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-19 11:47:39 -04:00
Santiago Gimeno
57f0595177 test: fix flaky test-http-set-timeout-server
Make the servers listen on a free port number picked by the OS to avoid
rare `EADDRINUSE` errors on `SmartOS`.

Fixes: https://github.com/nodejs/node/issues/6197
PR-URL: https://github.com/nodejs/node/pull/6248
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-19 10:20:32 +02:00
Santiago Gimeno
bf22c71a7a test: fix test-net-settimeout flakiness
Wait for the data to be received by the socket before creating the
clean-up timer. This way, a possible (though unlikely) `ECONNRESET`
error can be avoided.

PR-URL: https://github.com/nodejs/node/pull/6166
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-04-19 09:08:02 +02:00
James Lal
c7fef3d3b8
zlib: fix use after null when calling .close
An internal zlib error may cause _handle to be set to null.
Close now will check if there is a _handle prior to calling .close on
it.

PR-URL: https://github.com/nodejs/node/pull/5982
Fixes: https://github.com/nodejs/node/issues/6034
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-19 08:46:54 +02:00
Brian White
e38bade828
events: don't inherit from Object.prototype
This commit safely allows event names that are named the same as
properties that are ordinarily inherited from Object.prototype such
as __proto__.

Fixes: https://github.com/nodejs/node/issues/728
PR-URL: https://github.com/nodejs/node/pull/6092
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 21:45:26 -04:00
Brian White
dba245f796
querystring: don't inherit from Object.prototype
This commit safely allows querystring keys that are named the same as
properties that are ordinarily inherited from Object.prototype such
as __proto__. Additionally, this commit provides a bit of a speed
improvement (~25% in the querystring-parse 'manypairs' benchmark)
when there are many unique keys.

Fixes: https://github.com/nodejs/node/issues/5642
PR-URL: https://github.com/nodejs/node/pull/6055
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 21:40:03 -04:00
Rich Trott
ca698330ac tools: lint for alignment of variable assignments
Enforce alignment/indentation on variable assignments that span multiple
lines.

PR-URL: https://github.com/nodejs/node/pull/6242
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 17:19:16 -07:00
Rich Trott
31600735f4 lib,test,tools: alignment on variable assignments
Correct alignment on variable assignments that span multiple lines in
preparation for lint rule to enforce such alignment.

PR-URL: https://github.com/nodejs/node/pull/6242
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 17:19:11 -07:00
Ilya Shaisultanov
c1d82ac2ff assert: respect assert.doesNotThrow message.
Special handling to detect when user has supplied a custom message.
Added a test for user message.
When testing if `actual` value is an error use
`util.isError` instead of `instanceof`.

Fixes: https://github.com/nodejs/node/issues/2385
PR-URL: https://github.com/nodejs/node/pull/2407
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:49:26 -07:00
abouthiroppy
9a9beefe23 doc: replace functions with arrow functions
PR-URL: https://github.com/nodejs/node/pull/6203
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:29:23 -07:00
William Kapke
71801b773a doc: DCO anchor that doesn't change
PR-URL: https://github.com/nodejs/node/pull/6257
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:23:35 -07:00
Igor Klopov
4c234df264 doc: path.resolve ignores zero-length strings
https://github.com/nodejs/node/blob/master/lib/path.js#L187
https://github.com/nodejs/node/blob/master/lib/path.js#L1189

PR-URL: https://github.com/nodejs/node/pull/5928
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:16:47 -07:00
Matthew Douglass
a974e852c6 doc: fix http response event, Agent#getName
Removes the options block from the http 'response' event and attaches
it to Agent#getName where it belongs. Removes socketPath and documents
localAddress option.

PR-URL: https://github.com/nodejs/node/pull/5993
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:05:30 -07:00
Nikolai Vavilov
cf29b2f815 doc: document intention and dangers of fs module Buffer API
PR-URL: https://github.com/nodejs/node/pull/6020
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:03:04 -07:00
Calvin Metcalf
1d9451bb5a crypto: better error message for createHash
calling digest or update on a hash object after digest has been called
now gives a topical error message instead of an error message saying that the
hash failed to initialize.

PR-URL: https://github.com/nodejs/node/pull/6042
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 16:00:41 -07:00
Steven R. Loomis
7097212cb6 tools: fix license-builder.sh again for ICU
* Modify tools/license-builder.sh to support ICU 57.1's plain text
license. (Separate issue to add ICU 57.1 in #6058)
* Update/regenerate LICENSE to include ICU 57.1's license
* Note that because the tool was rerun, the change in #6065 is already
included here.

PR-URL: https://github.com/nodejs/node/pull/6068
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 15:58:22 -07:00
Mike Kaufman
61886fad73 gitignore: adding .vs/ directory to .gitignore
This is created by vs 2015 for user & machine-specific files and should
be ignored by git.

PR-URL: https://github.com/nodejs/node/pull/6070
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 15:55:35 -07:00
Mike Kaufman
64d36bec23 gitignore: ignore VS 2015 *.VC.opendb files
These files are created by VS 2015 and should be ignored by git.

PR-URL: https://github.com/nodejs/node/pull/6070
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 15:55:31 -07:00
Alexander Gromnitsky
3641ca9849 doc: fix broken references
PR-URL: https://github.com/nodejs/node/pull/6100
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 15:50:55 -07:00
James M Snell
40a5761969 doc: explain differences in console.assert between node and browsers
Provide an example for implementing browser like behavior for console.assert.

This "fixes" https://github.com/nodejs/node/issues/5340 by providing an
alternative to changing Node.js' implemented behavior. Instead, we
document the differences and show how to work around them if
browser like semantics are desired.

Fixes: https://github.com/nodejs/node/issues/5340
PR-URL: https://github.com/nodejs/node/pull/6169
Reviewed-By: Robert Jefe Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Jeff Harris <@techjeffharris>
2016-04-18 15:42:29 -07:00
Anna Henningsen
ebc8c37f70 repl: keep the built-in modules non-enumerable
Make sure that the built-in modules in the repl stay non-enumerable.
Previously, they would pop up as enumerable properties of the global
object after having been accessed for the first time.

PR-URL: https://github.com/nodejs/node/pull/6207
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-18 15:31:51 -07:00
Anna Henningsen
39d905e293 node: make builtin libs available for --eval
Make the builtin libraries available for the `--eval` and
`--print` CLI options, using the same mechanism that the
REPL uses.

This renders workarounds like `node -e 'require("fs").doStuff()'`
unnecessary.

As part of this, the list of builtin modules and the code for
adding the corresponding properties to the target context is moved
to `internal/module.js`, and the previously missing `repl` entry
is added.

PR-URL: https://github.com/nodejs/node/pull/6207
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-18 15:31:32 -07:00
Jeremiah Senkpiel
15d970d65c test,repl: use deepStrictEqual for false-y values
PR-URL: https://github.com/nodejs/node/pull/6196
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-04-18 15:20:43 -07:00
Bryan English
5c14d695d2 doc: native module reloading is not supported
Clarify in docs for require.cache that reloading native modules
isn't supported.

Related: #6160
PR-URL: https://github.com/nodejs/node/pull/6168
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 15:17:41 -07:00
Brian White
58561cf6a8 tools: move message listener to worker objects
Moving the `message` event listener from the cluster object to each
worker object allows easier backporting of the recent jslint
changes since v5.x and older do not have v6.x's `worker` parameter
in the cluster object's `message` event.

PR-URL: https://github.com/nodejs/node/pull/6212
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-04-18 14:41:18 -07:00
Michael Dawson
af4a380d40 deps: cherry-pick 1ef7487b from v8 upstream
Original commit message:

     Improved diagnostic message for JS heap out of memory

     This patch replaces the unused 'take_snapshot' parameter on
     FatalProcessOutOfMemory() with a 'is_heap_oom' parameter.
     The parameter is set to true on error paths where the
     JS heap is out of memory, as distinct from a malloc()
     failure i.e. process out of memory.  The message output to
     stderr or passed to embedding applications via FatalErrorCallback
     is 'Javascript heap out of memory' rather than
     'process out of memory'.

     BUG=

     R=jochen@chromium.org, verwaest@chromium.org, michael_dawson@ca.ibm.com

     Review URL: https://codereview.chromium.org/1873443002

     Cr-Commit-Position: refs/heads/master@{#35431}

We'd like this in 6.x to help with diagnosing customer problems.
It provides a better message on OOM so that it is easier to
be able to tell whether the OOM was due to heap exhaustion
or running out of native memory.

PR-URL: https://github.com/nodejs/node/pull/6218
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 15:49:55 -04:00
Rich Trott
b7f4b1ba4c process: fix incorrect usage of assert.fail()
The message argument for `assert.fail()` is the third argument, not the
first. Correct minor misuse in internal module.

PR-URL: https://github.com/nodejs/node/pull/6211
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-18 09:55:41 -07:00
Alexander Makarenko
eafd31a4eb tools,doc: parse types in braces everywhere
Also add `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`,
`TypeError`, `URIError` to list of global types. Fix errors.markdown
copy accordingly.

Fixes: https://github.com/nodejs/node/issues/5325.
PR-URL: https://github.com/nodejs/node/pull/5329
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 09:53:52 -07:00
Joran Dirk Greef
88c35e70a0 doc: clarify fs.watch() and inodes on linux, os x
On Linux and OS X systems, `fs.watch()` resolves the watched path to an
inode. This clarifies that `fs.watch()` watches the inode and not the
path. If the inode of the path subsequently changes, `fs.watch()` will
continue watching the original inode and events for the path will no
longer be emitted. This is expected behavior.

Fixes: https://github.com/nodejs/node/issues/5039
PR-URL: https://github.com/nodejs/node/pull/6099
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-18 09:50:37 -07:00
Santiago Gimeno
b95160daae test: move the debugger tests back to parallel
Run the debugger with `--port=common.PORT` to avoid the use of the same
port.

PR-URL: https://github.com/nodejs/node/pull/6246
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-18 16:55:48 +02:00
Ben Noordhuis
642076f2af src: don't set non-primitive values on templates
V8 is going to disallow non-primitive values on v8::FunctionTemplate
and v8::ObjectTemplate because those can't be shared across contexts.

Fixes: https://github.com/nodejs/node/issues/6216
PR-URL: https://github.com/nodejs/node/pull/6228
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-04-18 11:39:52 +02:00
Rich Trott
15f13cd74a test,vm: enable strict mode for vm tests
Some vm tests are not in strict mode because they need to create and use
global variables. By using `global.foo` instead of just `foo`, we can
still enable strict mode.

PR-URL: https://github.com/nodejs/node/pull/6209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
2016-04-17 20:02:46 -07:00
Anna Henningsen
978166796e
zlib: Make the finish flush flag configurable
Up to now, `Z_FINISH` was always the flushing flag that was used
for the last chunk of input data. This patch makes this choice
configurable so that advanced users can perform e.g. decompression of
partial data using `Z_SYNC_FLUSH`, if that suits their needs.

Add tests to make sure that an error is thrown upon encountering
invalid `flush` or `finishFlush` flags.

Fixes: https://github.com/nodejs/node/issues/5761
PR-URL: https://github.com/nodejs/node/pull/6069
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-17 17:01:55 +02:00
Johan Bergström
f49a1d0501 build: allow test-ci to run tests in parallel
Run tests in parallel if the environment variable JOBS
(which should contain a number of parallel jobs) is set.

PR-URL: https://github.com/nodejs/node/pull/6208
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-16 10:14:44 +09:00