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: crash on extension unload when script validation finishes #41686

Merged
merged 1 commit into from Mar 26, 2024

Conversation

codebytere
Copy link
Member

Description of Change

Refs CL:5225796

Fixes a potential crash on extension unload when script validation finishes. An extension may be unloaded while file validation for content scripts that are being registered is taking place. Fix this by guarding against an unloaded extension in OnUserScriptFilesValidated by returning early.

Checklist

Release Notes

Notes: Fixed a potential crash in chrome.scripting on extension unload.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/29-x-y PR should also be added to the "29-x-y" branch. target/30-x-y PR should also be added to the "30-x-y" branch. labels Mar 25, 2024
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 25, 2024
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 26, 2024
@codebytere
Copy link
Member Author

Flaky failure:

tag methods .capturePage() returns a Promise with a NativeImage in the renderer

@codebytere codebytere merged commit 32b44aa into main Mar 26, 2024
24 of 25 checks passed
@codebytere codebytere deleted the fix-scripting-validation-crash branch March 26, 2024 13:32
Copy link

release-clerk bot commented Mar 26, 2024

Release Notes Persisted

Fixed a potential crash in chrome.scripting on extension unload.

@trop
Copy link
Contributor

trop bot commented Mar 26, 2024

I have automatically backported this PR to "29-x-y", please check out #41701

@trop trop bot added in-flight/29-x-y and removed target/29-x-y PR should also be added to the "29-x-y" branch. labels Mar 26, 2024
@trop
Copy link
Contributor

trop bot commented Mar 26, 2024

I have automatically backported this PR to "30-x-y", please check out #41702

@trop trop bot added in-flight/30-x-y merged/30-x-y PR was merged to the "30-x-y" branch. merged/29-x-y PR was merged to the "29-x-y" branch. and removed target/30-x-y PR should also be added to the "30-x-y" branch. in-flight/30-x-y in-flight/29-x-y labels Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/29-x-y PR was merged to the "29-x-y" branch. merged/30-x-y PR was merged to the "30-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants