guybedford
dce72c2335
module: check file url passed to top-level import
...
Fixes: https://github.com/nodejs/node/issues/15374
PR-URL: https://github.com/nodejs/node/pull/15389
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-09-15 12:32:48 -07:00
hisener
a5916107dd
doc: fix wrong history entry in deepStrictEqual
...
PR-URL: https://github.com/nodejs/node/pull/15381
Fixes: https://github.com/nodejs/node/issues/15379
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-15 10:21:13 -07:00
Oblosys
8bd1668ca5
doc: fix emitKeypressEvents stream type
...
PR-URL: https://github.com/nodejs/node/pull/15399
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-15 09:40:20 -07:00
James M Snell
d8a0364ad5
async_hooks,doc: some async_hooks improvements
...
Update docs and type checking for AsyncResource type
PR-URL: https://github.com/nodejs/node/pull/15103
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-15 09:06:13 -07:00
Ruben Bridgewater
8f52ccc828
test: fix actual and expected order
...
In addition use the newer common.expectsError version.
PR-URL: https://github.com/nodejs/node/pull/14881
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-09-14 21:53:20 -03:00
Ruben Bridgewater
e3f4305c25
test: improve util inspect tests
...
Remove unnecessary code parts and outdated code
PR-URL: https://github.com/nodejs/node/pull/14881
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-09-14 21:53:19 -03:00
Ruben Bridgewater
bac313b086
util: fix out of bounds indices in util.inspect
...
This fixes a issue brought up in #15288 .
PR-URL: https://github.com/nodejs/node/pull/14881
Refs: https://github.com/nodejs/node/issues/15288
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-09-14 21:53:19 -03:00
Ruben Bridgewater
f9ad23dc91
util: refactor inspect for performance and more
...
The main optimizations are
- Removed visibleKeys
- Removed proxy cache
- Removed Object.assign
- No key concatenating anymore
- No key recalculating anymore
- Improved indentation logic
- Improved string escape logic
- Added many fast paths
- Optimized code branches a lot
- Optimized (boxed) primitive handling
- Inline code if possible
- Only check extra keys if necessary
- Guard against unnecessary more expensive calls
This also fixes a bug with special array number keys as e.g. "00".
Besides that there were lots of smaller optimizations, the
code got a bit cleaned up and a few more tests got in.
PR-URL: https://github.com/nodejs/node/pull/14881
Fixes: https://github.com/nodejs/node/issues/15288
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-09-14 21:52:58 -03:00
Ruben Bridgewater
01652ccc68
util: add fast internal array join method
...
PR-URL: https://github.com/nodejs/node/pull/14881
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-09-14 21:46:33 -03:00
Ruben Bridgewater
6bfc439711
benchmark: improve and add more inspect benchmarks
...
PR-URL: https://github.com/nodejs/node/pull/14881
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2017-09-14 21:46:25 -03:00
Rich Trott
082c43400d
test: move test-benchmark-buffer to sequential
...
`test-benchmark-buffer` has been observed to timeout on CI on SmartOS.
Move the test to `sequential` so it is not competing with other tests
for resources.
PR-URL: https://github.com/nodejs/node/pull/15373
Fixes: https://github.com/nodejs/node/issues/15372
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 14:24:36 -07:00
Jon Moss
e9358af581
errors: remove duplicate error definition
...
Also fixes error being (now!) properly thrown by alphabetize-errors.
also properly enable lint rule
Was not using proper magic comment syntax before!
-URL: https://github.com/nodejs/node/pull/15307
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 13:40:18 -07:00
Sampson Gao
973c12f631
n-api: napi_is_construct_call->napi_get_new_target
...
Remove napi_is_construct_call and introduce napi_get_new_target.
PR-URL: https://github.com/nodejs/node/pull/14698
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
2017-09-14 16:21:27 -04:00
Jason Ginchereau
0c258bdc40
n-api: Context for custom async operations
...
- Add napi_async_context opaque pointer type.
(If needed, we could later add APIs for getting the async IDs
out of this context.)
- Add napi_async_init() and napi_async_destroy() APIs.
- Add async_context parameter to napi_make_callback().
- Add code and checks to test_make_callback to validate async context
APIs by checking async hooks are called with correct context.
- Update API documentation.
PR-URL: https://github.com/nodejs/node/pull/15189
Fixes: https://github.com/nodejs/node/issues/13254
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 16:05:46 -04:00
Taylor Woll
92e5f5cc09
n-api: refactor napi_addon_register_func
...
As per discussion in abi-stable-node:
https://github.com/nodejs/abi-stable-node/issues/256 ,
take a refactor to napi_addon_register_func such that
the result from the register function is assigned to
the module exports property. By making this change,
native module can be agnostic about which type of
module the environment supports.
PR-URL: https://github.com/nodejs/node/pull/15088
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Hitesh Kanwathirtha <digitalinfinity@gmail.com >
2017-09-14 15:02:10 -04:00
Evan Lucas
d195a069b6
src: fix typo in probe description
...
This fixes a typo in a probe description added in
dc1996dd1f .
PR-URL: https://github.com/nodejs/node/pull/15397
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-09-14 11:29:42 -07:00
Jon Moss
7456db937d
test: convert buffer benchmark to runBenchmark
...
PR-URL: https://github.com/nodejs/node/pull/15349
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-09-14 11:17:35 -07:00
Jason Ginchereau
1a0727d85e
n-api: change async resource name to napi_value
...
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-09-14 17:39:05 +02:00
Anna Henningsen
2509c34782
src: move DomainEnter,DomainExit to node.cc
...
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2017-09-14 17:39:00 +02:00
Anna Henningsen
bdaa2cb585
test: add regression test for 5691
...
With `CallbackScope`, this has become possible to do properly.
Fixes: https://github.com/nodejs/node/issues/5691
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:45 +02:00
Anna Henningsen
8c8c90b714
n-api: use AsyncResource for Work tracking
...
Enable combining N-API async work with async-hooks.
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com >
Reviewed-By: Michael Dawson <mhdawson@ibm.com >
2017-09-14 17:38:45 +02:00
Anna Henningsen
a564c1eb20
src: remove virtually unused ExecScope
...
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:44 +02:00
Anna Henningsen
64616bb769
src: refactor async callback handling
...
- Merge the two almost-but-not-quite identical `MakeCallback()`
implementations
- Provide a public `CallbackScope` class for embedders in order
to enable `MakeCallback()`-like behaviour without tying that
to calling a JS function
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:44 +02:00
Anna Henningsen
be6d807bbf
src: make in_makecallback() getter const
...
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:43 +02:00
Anna Henningsen
290315ace7
src: refactor #include handling
...
`node_internals.h` already includes the most common headers,
so double includes can be avoided in a lot of cases. Also don’t include
`node_internals.h` from `node.h` implicitly anymore, as that is mostly
unnecessary.
PR-URL: https://github.com/nodejs/node/pull/14697
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 17:38:38 +02:00
Will Young
4ae0afb12b
dgram: added setMulticastInterface()
...
Add wrapper for uv's uv_udp_set_multicast_interface which provides the
sender side mechanism to explicitly select an interface. The
equivalent receiver side mechanism is the optional 2nd argument of
addMembership().
PR-URL: https://github.com/nodejs/node/pull/7855
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-14 17:03:19 +02:00
Myles Borins
cba206fa24
docs: update 8.5.0 changelog
...
The original changelog included incorrect information regarding
the new perf_hooks api.
refs: https://github.com/nodejs/node/pull/15308#issuecomment-328874385
PR-URL: https://github.com/nodejs/node/pull/15384
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-14 13:45:08 +02:00
cjihrig
688765a3c9
test: add test for fork() + shell
...
This commit verifies that the child_process fork() method does
not honor the shell option.
Refs: https://github.com/nodejs/node/pull/15299
PR-URL: https://github.com/nodejs/node/pull/15352
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2017-09-13 21:05:32 -04:00
Alex Gresnel
ed2f347f27
child_process: set shell to false in fork()
...
This commit ensures that spawn()'s shell option is unconditionally
set to false when fork() is called.
Refs: https://github.com/nodejs/node/pull/15299
Fixes: https://github.com/nodejs/node/issues/13983
PR-URL: https://github.com/nodejs/node/pull/15352
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-09-13 21:03:39 -04:00
Refael Ackermann
b8d532c4bd
test: allow adding known-globals through ENV
...
PR-URL: https://github.com/nodejs/node/pull/15187
Refs: https://youtrack.jetbrains.com/issue/WEB-27528
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-13 17:07:00 -04:00
Rich Trott
d38e643409
test: remove obsolete debugger tests
...
The tests in `test/debugger` all fail since the removal of the
pre-inspector debugger (if they weren't already failing). They do not
run in CI (probably because they were never reliable). Remove them and
associated fixtures.
PR-URL: https://github.com/nodejs/node/pull/15139
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-13 17:58:38 -03:00
Rich Trott
ff16337b80
doc: use consistent terminology in process doc
...
`process.md` uses `POSIX` in most places, but `Unix` (and in one case
`Linux`) in a handful of cases where `POSIX` is appropriate. Change
those instances to `POSIX`.
PR-URL: https://github.com/nodejs/node/pull/15321
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-13 17:16:25 -03:00
Rich Trott
6cfd77338a
test: remove invalid test
...
`test/known_issues/test-stdout-buffer-flush-on-exit.js` is invalid. The
behavior seen currently (with the test failing) is in accordance with
documentation which indicates that calling `process.exit()` may mean
scheduled asynchronous I/O does not happen. The documentation also
indicates that `process.stdout` is asynchronous when it is a POSIX pipe.
PR-URL: https://github.com/nodejs/node/pull/15320
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-13 17:15:11 -03:00
Rich Trott
a172b7c51e
test: refactor test-debug-prompt
...
* Use cleaner `process.stdin.write('.exit')` to exit the process rather
than `proc.kill()`.
* Move test to sequential. It uses the default port 9229. It will fail
if another inspector test (or test using port 0) is already using that
port. So it needs to be run sequentially rather than in parallel with
other tests. (We haven't seen many failures with it yet because there
aren't a lot of other inspector tests in parallel at this time.)
PR-URL: https://github.com/nodejs/node/pull/15141
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-09-13 17:12:57 -03:00
Anna Henningsen
5ee2d3ef0e
test: fix sequential/test-async-wrap-getasyncid
...
Previously, this test would contain a DNS query that timed out
after 60 seconds, thus occupying one of the parallel test slots
for that period.
Fix that by creating a new channel for that request, and cancelling
it immediately.
PR-URL: https://github.com/nodejs/node/pull/15319
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-13 17:08:58 -03:00
Michaël Zasso
99a779947c
doc: add missing doc for readable._destroy
...
PR-URL: https://github.com/nodejs/node/pull/15316
Fixes: https://github.com/nodejs/node/issues/15291
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-13 17:04:10 -03:00
Weijia Wang
eb4940e2d2
string_decoder: Migrate to use internal/errors
...
PR-URL: https://github.com/nodejs/node/pull/14682
Refs: https://github.com/nodejs/node/issues/11273
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-13 16:59:43 -03:00
XadillaX
468110b327
tls: deprecate parseCertString & move to internal
...
`tls.parseCertString()` exposed by accident. Now move this function to
`internal/tls` and mark the original one as deprecated.
PR-URL: https://github.com/nodejs/node/pull/14249
Refs: https://github.com/nodejs/node/issues/14193
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2017-09-13 16:54:35 -03:00
Jon Moss
f68ab39f8e
doc: add missing heading for error
...
PR-URL: https://github.com/nodejs/node/pull/15325
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-09-13 16:46:17 -03:00
James M Snell
bf1ca8fb2e
meta: improve contributors guide
...
PR-URL: https://github.com/nodejs/node/pull/15123
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
2017-09-13 10:45:50 -07:00
James M Snell
9d9552f7ee
http2: custom promisify for http2.connect
...
... and some other cleanups
PR-URL: https://github.com/nodejs/node/pull/15207
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-13 10:36:36 -07:00
James M Snell
ad3d899ae0
http2: improve http2 coverage
...
Improve http2 coverage through refactoring and tests
PR-URL: https://github.com/nodejs/node/pull/15210
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-13 09:47:09 -07:00
James M Snell
dcc41fd662
src: remove unused perf_hooks uv handles
...
A couple of unused uv handles were accidentally left
in env.
PR-URL: https://github.com/nodejs/node/pull/15368
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-09-13 09:21:14 -07:00
Anatoli Papirovski
1aca135cb9
http2: add tests for push stream error handling
...
Add tests that cover errors for wrong arguments, as well as
tests for error codes from nghttp2. Fix pushStream to emit
NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE on session rather than
stream.
PR-URL: https://github.com/nodejs/node/pull/15281
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-13 18:14:03 +02:00
Tuan Anh Tran
0dad97cdec
doc: fix "added in" for Buffer.allocUnsafeSlow()
...
PR-URL: https://github.com/nodejs/node/pull/15330
Fixes: https://github.com/nodejs/node/issues/15279
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-09-13 18:54:54 +03:00
Mike Kaufman
35a526c1d4
http2,async-wrap: introduce AliasedBuffer class
...
This change introduces an AliasedBuffer class and updates asytnc-wrap
and http2 to use this class.
A common technique to optimize performance is to create a native buffer
and then map that native buffer to user space via JS array. The runtime
can efficiently write to the native buffer without having to route
though JS, and the values being written are accessible from user space.
While efficient, this technique allows modifications to user
space memory w/out going through JS type system APIs, effectively
bypassing any monitoring the JS VM has in place to track program state
modifications. The result is that monitors have an incorrect view
of prorgram state.
The AliasedBuffer class provides a future placeholder where this
technique can be used, but writes can still be observed. To achieve
this, the node-chakra-core fork will add in appropriate tracking logic
in the AliasedBuffer's SetValue() method. Going forward, this class can
evolve to support more sophisticated mechanisms if necessary.
PR-URL: https://github.com/nodejs/node/pull/15077
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-09-13 17:44:24 +02:00
Damien O'Reilly
2ac7b433b4
dgram: support for setting socket buffer size
...
* setRecvBufferSize(int) and setSendBufferSize(int)
* added docs for send/receive buffer sizes
* Added options support to set buffer sizes in
dgram.createSocket().
PR-URL: https://github.com/nodejs/node/pull/13623
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-09-13 11:23:04 -04:00
Bartosz Sosnowski
fca7e49e44
test: adjust windows failed alloc test to V8 6.2
...
PR-URL: https://github.com/nodejs/node/pull/14730
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-13 16:16:43 +02:00
Michaël Zasso
dc1996dd1f
src: fix SmartOS compilation
...
Refs: https://github.com/nodejs/node-v8/issues/8
PR-URL: https://github.com/nodejs/node/pull/14730
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-13 16:16:41 +02:00
Michaël Zasso
31ce2c1b92
deps: add postmortem metadata for V8 TurboFan
...
Refs: https://github.com/nodejs/llnode/pull/130
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/650746
PR-URL: https://github.com/nodejs/node/pull/14730
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2017-09-13 16:16:37 +02:00