[Webkit-unassigned] [Bug 232755] [GTK][a11y] Add implementation of document interface when building with ATSPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 19 06:46:20 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=232755

--- Comment #5 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 444813
  --> https://bugs.webkit.org/attachment.cgi?id=444813
Patch

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

>> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:112
>> +            return map;
> 
> I would first check m_coreObject and do the early return, after that we know
> that it will not be null and avoid checking it again. I am thinking of this:
> 
>   if (!m_coreObject)
>       return map;
> 
>   m_coreObject->updateBackingStore();
>   auto* document = m_coreObject->document();
>   // ...rest of the code as it was...

This is because updateBackingStore can make m_coreObject nullptr.

>> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:148
>> +            return { };
> 
> Same here, there are two null-checks on m_coreObject one right after the other.

Same here, the pattern is repeated everywhere.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211119/216aa513/attachment.htm>


More information about the webkit-unassigned mailing list