[webkit-changes] [WebKit/WebKit] ff96b4: AX: AccessibilityRenderObject::addRemoteSVGChildre...

Tyler Wilcock noreply at github.com
Wed Apr 5 20:04:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff96b4d0c1203fc293c8eba30d2022cf2e949a3e
      https://github.com/WebKit/WebKit/commit/ff96b4d0c1203fc293c8eba30d2022cf2e949a3e
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2023-04-05 (Wed, 05 Apr 2023)

  Changed paths:
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp

  Log Message:
  -----------
  AX: AccessibilityRenderObject::addRemoteSVGChildren() should protect the created SVG object with a RefPtr
https://bugs.webkit.org/show_bug.cgi?id=255047
rdar://problem/107674710

Reviewed by Chris Fleizach.

Per https://github.com/WebKit/WebKit/wiki/Smart-Pointer-Usage-Guidelines:

> Every object passed to a non-trivial function as an argument (including "this" pointer) should be stored as a Ref, RefPtr, CheckedRef, or CheckedPtr in the caller’s local scope

Let's bring this function inline with this guidance since AccessibilityObject::addChild is not trivial.

This RefPtr will be free in the common case that there is no remote SVG root object to add.

* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRemoteSVGChildren):

Canonical link: https://commits.webkit.org/262656@main




More information about the webkit-changes mailing list