Commit 7ba3055
src: set PromiseHooks by Environment
The new JS PromiseHooks introduced in the referenced PR are per
v8::Context. This meant that code depending on them, such as
AsyncLocalStorage, wouldn't behave correctly across vm.Context
instances.
PromiseHooks are now synchronized across the main Context and any
Context created via vm.Context.
Refs: #36394
Fixes: #38781
Signed-off-by: Bryan English <bryan@bryanenglish.com>
PR-URL: #38821
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>1 parent f162896 commit 7ba3055Copy full SHA for 7ba3055
File tree
Expand file treeCollapse file tree
6 files changed
+112
-2
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
6 files changed
+112
-2
lines changedOpen diff view settings
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
454 | 454 | |
455 | 455 | |
456 | 456 | |
457 | | - |
458 | | - |
| 457 | + |
| 458 | + |
459 | 459 | |
460 | 460 | |
461 | 461 | |
|
Collapse file
+51Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
98 | 112 | |
99 | 113 | |
100 | 114 | |
| ||
217 | 231 | |
218 | 232 | |
219 | 233 | |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
220 | 269 | |
221 | 270 | |
222 | 271 | |
| ||
304 | 353 | |
305 | 354 | |
306 | 355 | |
| 356 | + |
| 357 | + |
307 | 358 | |
308 | 359 | |
309 | 360 | |
|
Collapse file
+7Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1156 | 1156 | |
1157 | 1157 | |
1158 | 1158 | |
| 1159 | + |
| 1160 | + |
| 1161 | + |
| 1162 | + |
| 1163 | + |
| 1164 | + |
1159 | 1165 | |
1160 | 1166 | |
1161 | 1167 | |
| ||
1164 | 1170 | |
1165 | 1171 | |
1166 | 1172 | |
| 1173 | + |
1167 | 1174 | |
1168 | 1175 | |
1169 | 1176 | |
|
Collapse file
+12Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
701 | 701 | |
702 | 702 | |
703 | 703 | |
| 704 | + |
| 705 | + |
| 706 | + |
| 707 | + |
| 708 | + |
704 | 709 | |
705 | 710 | |
706 | 711 | |
| ||
711 | 716 | |
712 | 717 | |
713 | 718 | |
| 719 | + |
| 720 | + |
| 721 | + |
714 | 722 | |
715 | 723 | |
716 | 724 | |
| ||
770 | 778 | |
771 | 779 | |
772 | 780 | |
| 781 | + |
| 782 | + |
| 783 | + |
| 784 | + |
773 | 785 | |
774 | 786 | |
775 | 787 | |
|
Collapse file
+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
127 | 127 | |
128 | 128 | |
129 | 129 | |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
130 | 135 | |
131 | 136 | |
132 | 137 | |
|
Collapse file
test/parallel/test-async-local-storage-contexts.js
Copy file name to clipboard+35Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
0 commit comments