diff options
author | Trevor Norris <trev.norris@gmail.com> | 2015-02-05 16:52:09 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2015-02-05 16:55:07 -0700 |
commit | 8d1179952aefaa0086ff5540671cfd6ff612594b (patch) | |
tree | 8726df061c6b6466385008ea0eb9755b894f9b16 /src/async-wrap-inl.h | |
parent | 62512bb29cd000dd5ce848258c10f3211f153bd5 (diff) | |
download | android-node-v8-8d1179952aefaa0086ff5540671cfd6ff612594b.tar.gz android-node-v8-8d1179952aefaa0086ff5540671cfd6ff612594b.tar.bz2 android-node-v8-8d1179952aefaa0086ff5540671cfd6ff612594b.zip |
asyncwrap: fix nullptr parent check
The nullptr check for parent on entry to the constructor should be ==
not !=. This allows reqs that have a parent to run their own init hook
callbacks even if kCallInitHook has been disabled.
Diffstat (limited to 'src/async-wrap-inl.h')
-rw-r--r-- | src/async-wrap-inl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index 6b434c08c0..f0b5c1ea08 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -23,7 +23,7 @@ inline AsyncWrap::AsyncWrap(Environment* env, // Check user controlled flag to see if the init callback should run. if (!env->using_asyncwrap()) return; - if (!env->call_async_init_hook() && parent != nullptr) + if (!env->call_async_init_hook() && parent == nullptr) return; // TODO(trevnorris): Until it's verified all passed object's are not weak, |