Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix a crash when a JSObject was finalized after the ExecutingContext was freed. #372

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

andycall
Copy link
Member

When opening multiple WebF pages, all WebF pages share a QuickJS runtime and some JSObjects are shared across multiple pages. When the shared JSObjects are finalized by the GC, the owner ExecutionContext could already be freed, and reading them could cause our apps to exit.

This patch checks whether the ExecutionContext is valid before accessing the ExecutionContext's memory.

@andycall andycall requested a review from ErosZy June 6, 2023 08:02
@andycall andycall added this pull request to the merge queue Jun 6, 2023
Merged via the queue into main with commit d0c1c6c Jun 6, 2023
@andycall andycall deleted the fix/crash_at_dispose_page branch June 6, 2023 08:30
@andycall andycall self-assigned this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants