You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aebaba9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(worker): drop __runOnMainThread callbacks from a closing worker
The main thread read a worker's isolate from the callback cache, released
the cache lock, then took a Locker on it. A worker shutting down in that
window disposed the isolate first, and the main thread crashed in
v8::Locker::Initialize.
Each worker now has a gate the main thread holds from checking it until it
owns the worker's Locker. Shutdown closes the gate before taking its
teardown Locker, so a callback that arrives after that is dropped without
touching the isolate, and the worker never waits on the main thread.
A worker callback that throws under uncaughtErrorPolicy "throw" is now
reported through the worker's own error path (its onerror, then the
parent's Worker object) instead of being rethrown on the main thread,
where it became a Java exception that resolved a handle from the worker
isolate against the main one and crashed.
0 commit comments