Tobias Nießen
7e29453d2f
crypto: simplify Hmac::HmacUpdate
...
This makes HmacUpdate slightly simpler and introduces a CHECK instead
of ignoring invalid input types.
PR-URL: https://github.com/nodejs/node/pull/22132
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-08 12:03:06 -07:00
Ujjwal Sharma
c6a54af42a
src: remove calls to deprecated v8 functions (NumberValue)
...
Remove all calls to deprecated v8 functions (here:
Value::NumberValue) inside the code (src directory only).
PR-URL: https://github.com/nodejs/node/pull/22094
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-08-08 01:54:08 +05:30
James M Snell
080316b32a
trace_events: add node.promises category, rejection counter
...
Allow the trace event log to include a count of unhandled rejections
and handled after rejections. This is useful primarily as a quick
check to see if rejections may be going unhandled (and unnoticed
in a process).
PR-URL: https://github.com/nodejs/node/pull/22124
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-08-07 07:43:18 -07:00
Ouyang Yadong
2bea9cefbc
dgram: implement socket.bind({ fd })
...
dgram: Implement binding an existing `fd`. Allow pass a `fd` property
to `socket.bind()` in dgram.
src: Add `UDPWrap::Open`
PR-URL: https://github.com/nodejs/node/pull/21745
Fixes: https://github.com/nodejs/node/issues/14961
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-06 11:05:51 +02:00
Jon Moss
2519dcc273
src: remove unused env strings
...
user_string:
Usage removed in 4e05952a8a
onstop_string:
Usage removed in 7b46e177ba
max_old_space_size_string:
Added in 0df031acad , never used
max_semi_space_size_string:
Added in 0df031acad , never used
enter_string:
Usage removed in eeede3b19c
PR-URL: https://github.com/nodejs/node/pull/22137
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-05 20:49:48 +02:00
Anna Henningsen
5be9b1d7f3
process: use owner_symbol for _getActive*
...
This makes it easier to provide public APIs in the return types
of `process._getActiveHandles()` and `process._getActiveRequests()`.
PR-URL: https://github.com/nodejs/node/pull/22002
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-05 13:46:14 +02:00
Anna Henningsen
af7164ebcc
lib,src: standardize owner_symbol for handles
...
Instead of somtimes using an `owner` string to link from a
native handle object to the corresponding JS object, standardize
on a single symbol that fulfills this role.
PR-URL: https://github.com/nodejs/node/pull/22002
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-05 13:46:13 +02:00
Anna Henningsen
a196aa2e24
src: clean up PackageConfig pseudo-boolean fields
...
PR-URL: https://github.com/nodejs/node/pull/21987
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-05 02:08:51 +02:00
Jon Moss
bd2ee60eae
src: remove unused env->vm_parsing_context_symbol
...
Stopped being used via 77b52fd58f , was
originally added in d932e80231 .
For the one remaining usecase inside of `lib/vm.js`, define a Symbol at
the top of the file.
PR-URL: https://github.com/nodejs/node/pull/22034
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-04 15:32:35 -04:00
Aleksey Kozyatinskiy
0ed164e082
inspector: fixed V8InspectorClient::currentTimeMS
...
On inspector side inside V8 we assume that this method should
return number of ms since epoch.
PR-URL: https://github.com/nodejs/node/pull/21917
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-01 22:04:50 -07:00
Jon Moss
f479050916
src: rename PROVIDER_FSREQWRAP to PROVIDER_FSREQCALLBACK
...
PR-URL: https://github.com/nodejs/node/pull/21971
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-01 15:07:14 -04:00
Jon Moss
172b4d7ceb
src,lib: rename FSReqWrap to FSReqCallback
...
Given that FSReqPromise does not inherit from FSReqWrap, FSReqWrap
should be renamed FSReqCallback to better describe what it does.
First of a few upcoming `fs` refactorings :)
PR-URL: https://github.com/nodejs/node/pull/21971
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-01 15:07:06 -04:00
Anna Henningsen
281e5a3cee
src: clean up agent loop when exiting through destructor
...
Fixes: https://github.com/nodejs/node/issues/22042
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:17:06 +02:00
Anna Henningsen
5e83a2abd0
src: use only one tracing write fs req at a time
...
Concurrent writes to the same fd are generally not ideal,
since it’s not generally guaranteed that data from those
writes will end up on disk in the right order.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:57 +02:00
Anna Henningsen
25fdab5402
src: use unique_ptr for internal JSON trace writer
...
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:56 +02:00
Anna Henningsen
5c212a61d1
src: plug trace file file descriptor leak
...
Close existing file descriptors before overriding
the field with new ones.
Also, use `nullptr` as the loop for these synchronous
operations, since they do not run on the same thread
as the `uv_run()` call for the previously used loop.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:55 +02:00
Anna Henningsen
1f5aa5a23c
src: initialize file trace writer on tracing thread
...
Run the initialization for the file trace writer’s `uv_async_t`s
on the same thread as `uv_run()` for their loop to avoid race
conditions.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:54 +02:00
Anna Henningsen
703c231a02
src: close tracing event loop
...
Clean up resources when tearing down the tracing agent.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:53 +02:00
Anna Henningsen
eb0cf667ed
src: fix tracing if cwd or file path is inaccessible
...
Otherwise this would have crashed the process.
In particular, checking the return value of an libuv call against `-1`
was invalid to begin with, as libuv uses it to propagate the
error code.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:52 +02:00
Anna Henningsen
620e46c8b5
src: refactor default trace writer out of agent
...
The agent code is supposed to manage multiple writers/clients.
Adding the default writer into the mix breaks that encapsulation.
Instead, manage default options through a separate "virtual"
default client handle, and keep the file writer management
all to the actual users.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:51 +02:00
Anna Henningsen
3ac94dc977
src: refactor tracing agent code
...
Avoid unnecessary operations, add a bit of documentation,
and turn the `ClientHandle` smart pointer alias into a real
class.
This should allow de-coupling the unnecessary combination of
a single specific `file_writer` from `Agent`.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:48 +02:00
Anna Henningsen
ebfb52b14c
src: minor refactor of node_trace_events.cc
...
Avoid unnecessary copies/extra operations & align with our style guide,
and add protection against throwing getters.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:47 +02:00
Anna Henningsen
78c21bb3d8
src: reduce unnecessary includes
...
A forward declaration suffices and means that the tracing
agent header and its dependencies don’t need to be included
in nearly every Node.js file.
PR-URL: https://github.com/nodejs/node/pull/21867
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-08-01 17:16:47 +02:00
Michaël Zasso
afc5636fe6
src: rename WorkerThreadMain to PlatformWorkerThread
...
Refs: https://github.com/nodejs/node/pull/21079#discussion_r194251183
PR-URL: https://github.com/nodejs/node/pull/21982
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-29 21:41:28 +02:00
Ujjwal Sharma
07cb69720b
src: use UTF-8 for naming interfaces in unix
...
Use a UTF-8 encoded string for naming interfaces in unix, instead of
using Latin-1, as had been done on windows previously.
PR-URL: https://github.com/nodejs/node/pull/21926
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-29 17:04:48 +02:00
Ujjwal Sharma
86cae946de
src: use kInternalized instead of kNormal
...
Use v8::NewStringType::kInternalized instead of
v8::NewStringType::kNormal in different calls to v8::String::NewFromUtf8
in node.h and node.cc wherever it makes sense, to save the GC some work
which would largely be redundant.
PR-URL: https://github.com/nodejs/node/pull/21926
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-29 16:59:32 +02:00
Ujjwal Sharma
35ec9b247e
src: remove calls to deprecated v8 functions (NewFromUtf8)
...
Remove all calls to deprecated v8 functions (here: String::NewFromUtf8) inside
the code (src directory only).
PR-URL: https://github.com/nodejs/node/pull/21926
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-29 16:59:31 +02:00
Michael Dawson
c4de500c87
src: fix may be uninitialized warning in n-api
...
PR-URL: https://github.com/nodejs/node/pull/21898
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-27 23:08:51 -04:00
Jon Moss
51a50a09f0
src: use available ReqWrap instance for libuv req
...
Use available `ReqWrap` descendant to make call to libuv -- avoid doing
call with the `ReqWrap`'s request member and then calling `Dispatched()`
afterwards.
PR-URL: https://github.com/nodejs/node/pull/21980
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-27 22:56:15 -04:00
Joyee Cheung
28a3e280ec
src: add proper MemoryInfoName to wrappers
...
- Use camel case names for memory retainers inherited from AsyncWrap
instead of their provider names (which are all in upper case)
- Assign class names to wraps so that they appear in the heap snapshot
as nodes with class names as node names. Previously some nodes are
named with reference names, which are supposed to be edge names
instead.
PR-URL: https://github.com/nodejs/node/pull/21939
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-07-27 15:51:19 +08:00
Anna Henningsen
2db74f20f3
src: add missing cmath include to traced_value.cc
...
Fixes: https://github.com/nodejs/node/issues/21903
PR-URL: https://github.com/nodejs/node/pull/21924
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2018-07-26 13:08:43 +02:00
Gabriel Charette
0f3c2c64d2
src: use modern v8::Platform worker threads APIs
...
Precursor to removing deprecated APIs on the v8 side @
https://chromium-review.googlesource.com/c/v8/v8/+/1045310
PR-URL: https://github.com/nodejs/node/pull/21079
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
2018-07-26 08:35:06 +02:00
Michaël Zasso
6f9705275b
src: update NODE_MODULE_VERSION to 65
...
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 6.8.
Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: https://github.com/nodejs/node/pull/21079
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
2018-07-26 08:33:23 +02:00
Gabriel Schulhof
53296e8a3e
n-api: guard against cond null dereference
...
A condition variable is only created by the thread-safe function if the
queue size is set to something larger than zero. This adds null-checks
around the condition variable and tests for the case where the queue
size is zero.
Fixes: https://github.com/nodejs/help/issues/1387
PR-URL: https://github.com/nodejs/node/pull/21871
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-07-23 22:07:23 -04:00
James M Snell
f7454a53f1
trace_events: add support for builtin trace
...
PR-URL: https://github.com/nodejs/node/pull/21899
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-07-22 07:36:27 -07:00
Jon Moss
de8a8d056c
src: don't store one-use strings in variable
...
Move strings that are used only once to their call-sites, don't store
in a variable.
PR-URL: https://github.com/nodejs/node/pull/21876
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-22 09:40:04 -04:00
Jon Moss
b016d98cc3
src: remove unnecessary else
...
Argument is not used by the only caller.
PR-URL: https://github.com/nodejs/node/pull/21874
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-07-22 09:37:31 -04:00
Tobias Nießen
8ac916309b
src: fix formatting of PIDs
...
PR-URL: https://github.com/nodejs/node/pull/21852
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-07-22 02:53:05 +02:00
Anna Henningsen
4f47f62d8e
http2: remove unused nghttp2 error list
...
Remove a list of HTTP2 errors as well as `nghttp2_errname()`
that converted an integer nghttp2 error code to a string
representation.
We already use `nghttp2_strerror()` for this, which
is provided by nghttp2 returns a better error string anyway.
PR-URL: https://github.com/nodejs/node/pull/21827
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-19 19:45:46 +02:00
Anna Henningsen
2d32a7e90a
src: use offset calc. instead of req->data in node_file
...
A small refactor – this removes one layer of pointer indirection.
(The performance gain is likely negligible, the main point here
being that this encapsulates libuv request management a bit more.)
PR-URL: https://github.com/nodejs/node/pull/21839
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-07-19 12:11:42 +02:00
Benedikt Meurer
756f63e1e4
src: prepare for V8 Swallowed Rejection Hook
...
This is done in preparation for landing
https://chromium-review.googlesource.com/c/v8/v8/+/1126099
on the V8 side, which extends the existing PromiseRejectEvent mechanism
with new hooks for reject/resolve after a Promise was previously
resolved already.
Refs: https://github.com/nodejs/promises-debugging/issues/8
Design: https://goo.gl/2stLUY
PR-URL: https://github.com/nodejs/node/pull/21838
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
2018-07-19 08:49:18 +02:00
James M Snell
ededb4b510
trace_events: add more process metadata
...
Now that TracedValue has landed, add more detailed
process `__metadata` including versions, arch, platform,
release detail, and argv/execArgv to the trace event
log.
PR-URL: https://github.com/nodejs/node/pull/21785
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-07-18 17:23:55 +02:00
Ruben Bridgewater
81bc23fe61
util: improve display of iterators and weak entries
...
This adds the number of not visible elements when inspecting iterators
while exceeding `maxArrayLength`.
It also fixes a edge case with `maxArrayLength` and the map.entries()
iterator. Now the whole entry will be visible instead of only the key
but not the value of the first entry.
Besides that it uses a slighly better algorithm that improves the
performance by skipping unnecessary steps.
PR-URL: https://github.com/nodejs/node/pull/20961
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-07-18 17:21:14 +02:00
Tobias Nießen
7b6e2fc114
src: avoid unnecessarily formatting a warning
...
ProcessEmitWarning will already format the message, there is no
need to call snprintf here.
PR-URL: https://github.com/nodejs/node/pull/21832
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-18 15:47:05 +02:00
Tobias Nießen
b3f459e6cf
crypto: add support for OCB mode for AEAD
...
PR-URL: https://github.com/nodejs/node/pull/21447
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-18 13:10:10 +02:00
Tobias Nießen
3504850a00
buffer: remove superfluous assignment
...
PR-URL: https://github.com/nodejs/node/pull/21844
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-17 21:45:27 +02:00
Anna Henningsen
cf37945b12
src: include cwd in chdir error message
...
Include the current working directory in the error
message for a failing `process.chdir()` since that is
usually information relevant for debugging.
This is semver-major because it moves properties
of the error message object.
Inspired by https://github.com/nodejs/help/issues/1355 .
PR-URL: https://github.com/nodejs/node/pull/21526
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-07-17 13:57:11 +02:00
Anna Henningsen
d94950e960
http2: fix issues with aborted respondWithFile()s
...
PR-URL: https://github.com/nodejs/node/pull/21561
Fixes: https://github.com/nodejs/node/issues/20824
Fixes: https://github.com/nodejs/node/issues/21560
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-16 20:20:39 +02:00
Ruben Bridgewater
bd1f355fc5
lib,src: replace all C++ promises with JS promises
...
C++ promises can not be properly optimized by V8. They also behave
a tiny bit different than "regular" promises.
PR-URL: https://github.com/nodejs/node/pull/20830
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2018-07-16 16:45:48 +02:00
Anna Henningsen
db49589624
console,util: avoid pair array generation in C++
...
Use a plain `[key, value, key, value]`-style list instead
of an array of pairs for inspecting collections.
This also fixes a bug with `console.table()` where
inspecting a non-key-value `MapIterator` would have
led to odd results.
PR-URL: https://github.com/nodejs/node/pull/20831
Refs: https://github.com/nodejs/node/pull/20719#discussion_r189342513
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-16 10:46:09 +02:00