⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 280727 in webkit


Ignore:
Timestamp:
Aug 6, 2021, 9:52:46 AM (5 years ago)
Author:
Andres Gonzalez
Message:

Crash at WebKit::WebPage::requestTextRecognition caused by accessibility invocation.
https://bugs.webkit.org/show_bug.cgi?id=228864
rdar://80679512

Reviewed by Chris Fleizach.

  • accessibility/AXImage.cpp:

(WebCore::AXImage::imageOverlayElements):
It was calling requestTextRecognition with *element(), but element() can
return nullptr, which would lead to the crash.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r280723 r280727  
     12021-08-06  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        Crash at WebKit::WebPage::requestTextRecognition caused by accessibility invocation.
     4        https://bugs.webkit.org/show_bug.cgi?id=228864
     5        rdar://80679512
     6
     7        Reviewed by Chris Fleizach.
     8
     9        * accessibility/AXImage.cpp:
     10        (WebCore::AXImage::imageOverlayElements):
     11        It was calling requestTextRecognition with *element(), but element() can
     12        return nullptr, which would lead to the crash.
     13
    1142021-08-06  Jer Noble  <jer.noble@apple.com>
    215
  • trunk/Source/WebCore/accessibility/AXImage.cpp

    r279171 r280727  
    6868        return std::nullopt;
    6969
    70     page->chrome().client().requestTextRecognition(*element(), [] (RefPtr<Element>&& imageOverlayHost) {
     70    auto* element = this->element();
     71    if (!element)
     72        return std::nullopt;
     73
     74    page->chrome().client().requestTextRecognition(*element, [] (RefPtr<Element>&& imageOverlayHost) {
    7175        if (!imageOverlayHost)
    7276            return;
Note: See TracChangeset for help on using the changeset viewer.