Skip to content

fix: potential draggable regions crash in DevTools#43179

Merged
codebytere merged 1 commit intomainfrom
fix-draggable-regions
Aug 5, 2024
Merged

fix: potential draggable regions crash in DevTools#43179
codebytere merged 1 commit intomainfrom
fix-draggable-regions

Conversation

@codebytere
Copy link
Member

@codebytere codebytere commented Aug 2, 2024

Description of Change

Closes #43092

Fix a crash that can occur when SetSupportsDraggableRegions is called with true and there is no MainFrameImpl. When MainFrameImpl is nullptr, logic currently correctly returns early, but
supports_draggable_regions_ is set before that happens. As a result, when SupportsDraggableRegions() is called, it will return true, and thus LocalFrameView::UpdateDocumentDraggableRegions() will
call DraggableRegionsChanged(). This will trigger a crash in WebViewImpl::DraggableRegionsChanged(), as it assumes that MainFrameImpl is not null.

Upstreamed in https://chromium-review.googlesource.com/c/chromium/src/+/5756619

Checklist

Release Notes

Notes: Fixed a crash that could occur in some DevTools extensions containing draggable regions.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/31-x-y PR should also be added to the "31-x-y" branch. target/32-x-y PR should also be added to the "32-x-y" branch. labels Aug 2, 2024
@codebytere codebytere requested a review from a team as a code owner August 2, 2024 09:24
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Aug 2, 2024
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Aug 3, 2024
@codebytere codebytere merged commit 78995b9 into main Aug 5, 2024
@release-clerk
Copy link

release-clerk bot commented Aug 5, 2024

Release Notes Persisted

Fixed a crash that could occur in some DevTools extensions containing draggable regions.

@trop
Copy link
Contributor

trop bot commented Aug 5, 2024

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

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

trop bot commented Aug 5, 2024

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

@trop trop bot added in-flight/31-x-y and removed target/31-x-y PR should also be added to the "31-x-y" branch. labels Aug 5, 2024
@nikwen
Copy link
Member

nikwen commented Aug 5, 2024

Thank you for fixing this, @codebytere! 🙌

@trop trop bot added merged/31-x-y PR was merged to the "31-x-y" branch. merged/32-x-y PR was merged to the "32-x-y" branch. and removed in-flight/31-x-y in-flight/32-x-y labels Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/31-x-y PR was merged to the "31-x-y" branch. merged/32-x-y PR was merged to the "32-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: React devtools become unusable after opening profiler

4 participants