Commit c342bda
src: make cross-context MakeCallback() calls work
Check that invoking a callback on a receiver from a different context
works.
It ran afoul of an `env->context() == isolate->GetCurrentContext()`
assertion so retrieve the environment from the callback context and
the context to enter from the environment's context() method.
We could also have retrieved the environment from the receiver's context
and that would have made little practical difference. It just seemed
more correct to get it from the callback context because that is the
actual execution context.
PR-URL: #9221
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent 85a9295 commit c342bda
2 files changed
+34
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1304 | 1304 | | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
1311 | 1311 | | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
| 1312 | + | |
1315 | 1313 | | |
1316 | | - | |
| 1314 | + | |
1317 | 1315 | | |
1318 | 1316 | | |
1319 | 1317 | | |
1320 | 1318 | | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1325 | 1323 | | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1331 | 1329 | | |
1332 | 1330 | | |
1333 | 1331 | | |
1334 | 1332 | | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
1339 | 1344 | | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
1346 | 1349 | | |
1347 | 1350 | | |
1348 | 1351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
0 commit comments