Commit 15a6bb9
committed
fix(ffi): run block-disposal round-trip cleanup on the JS thread
Block disposal can run on an arbitrary thread (e.g. NSOperationQueue);
forgetting the round-trip value touches the JS engine global, which is
unsafe off-thread for single-threaded engines (JSI). Marshal the cleanup
to the JS thread. Fixes intermittent hermes Promise cross-thread crash.1 parent ec5a8c0 commit 15a6bb9
1 file changed
Lines changed: 21 additions & 5 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
525 | | - | |
526 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
527 | 528 | | |
528 | 529 | | |
529 | | - | |
530 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
531 | 547 | | |
532 | 548 | | |
533 | 549 | | |
| |||
0 commit comments