Summary: | Crash in RenderMenuList::didUpdateActiveOption. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andres Gonzalez <andresg_22> | ||||||||
Component: | New Bugs | Assignee: | Andres Gonzalez <andresg_22> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | aboxhall, apinheiro, cdumez, cfleizach, darin, dmazzoni, esprehn+autocc, ews-watchlist, glenn, jcraig, jdiggs, kondapallykalyan, mifenton, pdr, samuel_white, sam | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Andres Gonzalez
2020-03-10 09:45:18 PDT
Created attachment 393162 [details]
Patch
Comment on attachment 393162 [details]
Patch
Can we add a test?
Comment on attachment 393162 [details]
Patch
Needs a test.
Comment on attachment 393162 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=393162&action=review > Source/WebCore/rendering/RenderMenuList.cpp:428 > - if (auto* menuList = downcast<AccessibilityMenuList>(axCache->get(this))) > - menuList->didUpdateActiveOption(optionIndex); > + if (auto* axObject = axCache->get(this)) { > + if (!is<AccessibilityMenuList>(*axObject)) > + return; > + > + downcast<AccessibilityMenuList>(*axObject).didUpdateActiveOption(optionIndex); > + } More elegant way to write this taking advantage of the null checking built into is<>: auto* axObject = axCache->get(this); if (is<AccessibiltyMenuList>(axObject)) downcast<AccessibilityMenuList>(*axObject).didUpdateActiveOption(optionIndex); Created attachment 395303 [details]
Patch
(In reply to Darin Adler from comment #5) > Comment on attachment 393162 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=393162&action=review > > > Source/WebCore/rendering/RenderMenuList.cpp:428 > > - if (auto* menuList = downcast<AccessibilityMenuList>(axCache->get(this))) > > - menuList->didUpdateActiveOption(optionIndex); > > + if (auto* axObject = axCache->get(this)) { > > + if (!is<AccessibilityMenuList>(*axObject)) > > + return; > > + > > + downcast<AccessibilityMenuList>(*axObject).didUpdateActiveOption(optionIndex); > > + } > > More elegant way to write this taking advantage of the null checking built > into is<>: > > auto* axObject = axCache->get(this); > if (is<AccessibiltyMenuList>(axObject)) > > downcast<AccessibilityMenuList>(*axObject). > didUpdateActiveOption(optionIndex); Done. Thanks! Created attachment 395319 [details]
Patch
Committed r259438: <https://trac.webkit.org/changeset/259438> All reviewed patches have been landed. Closing bug and clearing flags on attachment 395319 [details]. |