summaryrefslogtreecommitdiff
path: root/src/pipe_wrap.h
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2017-03-07 12:40:18 -0700
committerAnna Henningsen <anna@addaleax.net>2017-05-10 22:22:20 +0200
commitc0bde73f1bbfedd4e77ddf87cf0bcec7bac9a61e (patch)
treed0c2399a318f8d6a8ee5f1ab272604ad3171fc15 /src/pipe_wrap.h
parentfe2df3b842205d8dedffcc83de387d43579ec760 (diff)
downloadandroid-node-v8-c0bde73f1bbfedd4e77ddf87cf0bcec7bac9a61e.tar.gz
android-node-v8-c0bde73f1bbfedd4e77ddf87cf0bcec7bac9a61e.tar.bz2
android-node-v8-c0bde73f1bbfedd4e77ddf87cf0bcec7bac9a61e.zip
src: implement native changes for async_hooks
Changes in the native code for the upcoming async_hooks module. These have been separated to help with review and testing. Changes include: * Introduce an async id stack that tracks recursive calls into async execution contexts. For performance reasons the id stack is held as a double* and assigned to a Float64Array. If the stack grows too large it is then placed in it's own stack and replaced with a new double*. This should accommodate arbitrarily large stacks. I'm not especially happy with the complexity involved with this async id stack, but it's also the fastest and most full proof way of handling it that I have found. * Add helper functions in Environment and AsyncWrap to work with the async id stack. * Add AsyncWrap::Reset() to allow AsyncWrap instances that have been placed in a resource pool, instead of being released, to be reinitialized. AsyncWrap::AsyncWrap() also now uses Reset() for initialization. * AsyncWrap* parent no longer needs to be passed via the constructor. * Introduce Environment::AsyncHooks class to contain the needed native functionality. This includes the pointer to the async id stack, and array of v8::Eternal<v8::String>'s that hold the names of all providers, mechanisms for storing/retrieving the trigger id, etc. * Introduce Environment::AsyncHooks::ExecScope as a way to track the current id and trigger id of function execution via RAII. * If the user passes --abort-on-uncaught-exception then instead of throwing the application will print a stack trace and abort. PR-URL: https://github.com/nodejs/node/pull/12892 Ref: https://github.com/nodejs/node/pull/11883 Ref: https://github.com/nodejs/node/pull/8531 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'src/pipe_wrap.h')
-rw-r--r--src/pipe_wrap.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pipe_wrap.h b/src/pipe_wrap.h
index 5ad6a9be1b..6db7f4561c 100644
--- a/src/pipe_wrap.h
+++ b/src/pipe_wrap.h
@@ -42,8 +42,7 @@ class PipeWrap : public ConnectionWrap<PipeWrap, uv_pipe_t> {
private:
PipeWrap(Environment* env,
v8::Local<v8::Object> object,
- bool ipc,
- AsyncWrap* parent);
+ bool ipc);
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
static void Bind(const v8::FunctionCallbackInfo<v8::Value>& args);