-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 274586@main (35318b4). https://bugs.webkit.org/show_bug.c…
…gi?id=269322 Crash under ~RenderMenuList due to CheckedPtr usage https://bugs.webkit.org/show_bug.cgi?id=269322 rdar://119790256 Reviewed by Alan Baradlay. From the crash trace, we can see that HTMLSelectElement::defaultEventHandler() holds a CheckedPtr to its RenderMenuList renderer and calls showPopup() on the renderer. This ends up running JS, which removes the select element from the DOM and in turns destroys the renderer. The usage is currently safe since nothing is using the renderer after the JS has run. However, it was tripping the CheckedPtr assertion. To address the issue, switch to using WeakPtr for now and add comments to clarify lifetime. We should consider refactoring this in a follow up though. * Source/WebCore/html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::platformHandleKeydownEvent): (WebCore::HTMLSelectElement::menuListDefaultEventHandler): (WebCore::HTMLSelectElement::showPicker): * Source/WebCore/rendering/RenderMenuList.cpp: (RenderMenuList::showPopup): Canonical link: https://commits.webkit.org/274586@main
- Loading branch information
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters