diff options
author | Trevor Norris <trev.norris@gmail.com> | 2015-10-20 12:20:10 -0600 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2015-11-06 16:37:11 -0700 |
commit | bb1bd7639554766a88b8f7aef8891bf8249e613e (patch) | |
tree | cbb2803efdc5e98007e196d3f4537aa712361b6b /test | |
parent | 80a66ba6aebd7f749dff6c9a650da79d83bb732e (diff) | |
download | android-node-v8-bb1bd7639554766a88b8f7aef8891bf8249e613e.tar.gz android-node-v8-bb1bd7639554766a88b8f7aef8891bf8249e613e.tar.bz2 android-node-v8-bb1bd7639554766a88b8f7aef8891bf8249e613e.zip |
async_wrap: call callback in destructor
Call a user's callback to notify that the handle has been destroyed.
Only pass the id of the AsyncWrap instance since the object no longer
exists.
The object that's being destructed should never be inspected within the
callback or any time afterward.
This commit make a breaking change. The init callback will now be passed
arguments in the order of provider, id, parent.
PR-URL: https://github.com/nodejs/node/pull/3461
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-async-wrap-disabled-propagate-parent.js | 2 | ||||
-rw-r--r-- | test/parallel/test-async-wrap-propagate-parent.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-async-wrap-disabled-propagate-parent.js b/test/parallel/test-async-wrap-disabled-propagate-parent.js index de36071524..70d82befe7 100644 --- a/test/parallel/test-async-wrap-disabled-propagate-parent.js +++ b/test/parallel/test-async-wrap-disabled-propagate-parent.js @@ -10,7 +10,7 @@ let cntr = 0; let server; let client; -function init(type, parent) { +function init(type, id, parent) { if (parent) { cntr++; // Cannot assert in init callback or will abort. diff --git a/test/parallel/test-async-wrap-propagate-parent.js b/test/parallel/test-async-wrap-propagate-parent.js index 8074b0062e..beeb27ba78 100644 --- a/test/parallel/test-async-wrap-propagate-parent.js +++ b/test/parallel/test-async-wrap-propagate-parent.js @@ -9,7 +9,7 @@ let cntr = 0; let server; let client; -function init(type, parent) { +function init(type, id, parent) { if (parent) { cntr++; // Cannot assert in init callback or will abort. |