Commit b663d2b
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: #3461
Reviewed-By: Fedor Indutny <fedor@indutny.com>1 parent eccbec9 commit b663d2bCopy full SHA for b663d2b
File tree
Expand file treeCollapse file tree
6 files changed
+25
-4
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
6 files changed
+25
-4
lines changedOpen diff view settings
Collapse file
+18-1Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
41 | 41 | |
42 | 42 | |
43 | 43 | |
| 44 | + |
44 | 45 | |
45 | 46 | |
46 | 47 | |
47 | 48 | |
48 | | - |
| 49 | + |
49 | 50 | |
50 | 51 | |
51 | 52 | |
| ||
57 | 58 | |
58 | 59 | |
59 | 60 | |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
60 | 77 | |
61 | 78 | |
62 | 79 | |
|
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
131 | 131 | |
132 | 132 | |
133 | 133 | |
| 134 | + |
| 135 | + |
134 | 136 | |
135 | 137 | |
136 | 138 | |
| ||
156 | 158 | |
157 | 159 | |
158 | 160 | |
| 161 | + |
159 | 162 | |
160 | 163 | |
161 | 164 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | | - |
| 54 | + |
55 | 55 | |
56 | 56 | |
57 | 57 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
236 | 236 | |
237 | 237 | |
238 | 238 | |
| 239 | + |
239 | 240 | |
240 | 241 | |
241 | 242 | |
|
Collapse file
test/parallel/test-async-wrap-disabled-propagate-parent.js
Copy file name to clipboardExpand all lines: test/parallel/test-async-wrap-disabled-propagate-parent.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
| 13 | + |
14 | 14 | |
15 | 15 | |
16 | 16 | |
|
Collapse file
test/parallel/test-async-wrap-propagate-parent.js
Copy file name to clipboardExpand all lines: test/parallel/test-async-wrap-propagate-parent.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
| 12 | + |
13 | 13 | |
14 | 14 | |
15 | 15 | |
|
0 commit comments