Skip to content

cherry-pick(worklets-0.10-stable): time-of-check and time-of-use destructor safety (#9790)#9801

Merged
tjzel merged 1 commit into
worklets-0.10-stablefrom
@tjzel/worklets-0.10-stable/cherry-pick-#9790
Jul 1, 2026
Merged

cherry-pick(worklets-0.10-stable): time-of-check and time-of-use destructor safety (#9790)#9801
tjzel merged 1 commit into
worklets-0.10-stablefrom
@tjzel/worklets-0.10-stable/cherry-pick-#9790

Conversation

@tjzel

@tjzel tjzel commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Cherry-picking #9790

Requires #9800 to be merged first.

@tjzel tjzel marked this pull request as ready for review July 1, 2026 09:06
Base automatically changed from @tjzel/worklets-0.10-stable/cherry-pick-#9789 to worklets-0.10-stable July 1, 2026 09:58
## Summary

Currently the way we check if the runtime is alive for safe destructor
invocations has a chance to lead to crashes anyway, since the runtime
can get cleaned up immediately after the check, since it lacks a locking
mechanism.

## Test plan

The test example from #9789 works.

(cherry picked from commit 71774cb)
@tjzel tjzel force-pushed the @tjzel/worklets-0.10-stable/cherry-pick-#9790 branch from 5e9fe7e to 817d5df Compare July 1, 2026 10:08
@tjzel tjzel merged commit ced2953 into worklets-0.10-stable Jul 1, 2026
13 checks passed
@tjzel tjzel deleted the @tjzel/worklets-0.10-stable/cherry-pick-#9790 branch July 1, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants