Repository navigation
Commit f50597d
authored
fix(worker): rethrow ordinary failures until a termination materializes
ReThrowToV8 skipped the throw whenever the runtime's termination-requested
flag was set. Between terminate() setting that flag and V8 delivering the
interrupt, JS still runs, so an ordinary native failure in that window
returned nothing: require() yielded undefined and a native constructor
handed back an uninitialized object, which a following call could trip an
assert on in Debug builds. The skip now keys on IsExecutionTerminating()
alone; inside a callback a materialized termination is never cleared on the
way up, so that signal is sufficient there.
Also gives the module-instantiate failure in LoadESModule the same
termination check as the runner's other failure sites, so a terminated link
is reported as an interruption rather than logged as an instantiation error.1 parent f21db6f commit f50597d
2 files changed
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1652 | 1652 | | |
1653 | 1653 | | |
1654 | 1654 | | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
1655 | 1662 | | |
1656 | 1663 | | |
1657 | 1664 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
724 | 723 | | |
725 | 724 | | |
726 | 725 | | |
| |||
0 commit comments