Bug 213798 - [iOS] Crash under WebKit::WebPage::getFocusedElementInformation()
Summary: [iOS] Crash under WebKit::WebPage::getFocusedElementInformation()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-30 08:07 PDT by Antoine Quint
Modified: 2020-06-30 17:16 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.65 KB, patch)
2020-06-30 08:11 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2020-06-30 08:07:22 PDT
[iOS] Crash under WebKit::WebPage::getFocusedElementInformation()
Comment 1 Antoine Quint 2020-06-30 08:11:25 PDT
Created attachment 403201 [details]
Patch
Comment 2 Antoine Quint 2020-06-30 08:11:56 PDT
<rdar://problem/62754594>
Comment 3 EWS 2020-06-30 08:56:51 PDT
Committed r263752: <https://trac.webkit.org/changeset/263752>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 403201 [details].
Comment 4 Darin Adler 2020-06-30 17:16:54 PDT
Comment on attachment 403201 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=403201&action=review

> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:3108
> +            for (unsigned index = 0; index < labels->length(); ++index) {
> +                if (is<Element>(labels->item(index)) && labels->item(index)->renderer())
> +                    associatedLabels.append(downcast<Element>(*labels->item(index)));
> +            }

Not new to this patch: Is NodeList::item efficient enough that we should call it 3 times rather than putting the result into a local?