[webkit-reviews] review denied: [Bug 232755] [GTK][a11y] Add implementation of document interface when building with ATSPI : [Attachment 444813] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 19 06:42:01 PST 2021

Adrian Perez <aperez at igalia.com> has denied Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 232755: [GTK][a11y] Add implementation of document interface when building
with ATSPI

Attachment 444813: Patch


--- Comment #4 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 444813
  --> https://bugs.webkit.org/attachment.cgi?id=444813

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;

  auto* document = m_coreObject->document();
  // ...rest of the code as it was...

> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:148
> +	       return { };

Same here, there are two null-checks on m_coreObject one right after the other.

More information about the webkit-reviews mailing list