<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Crash at AccessibilityRenderObject::computeAccessibilityIsIgnored const + 552"
   href="https://bugs.webkit.org/show_bug.cgi?id=161276#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Crash at AccessibilityRenderObject::computeAccessibilityIsIgnored const + 552"
   href="https://bugs.webkit.org/show_bug.cgi?id=161276">bug 161276</a>
              from <span class="vcard"><a class="email" href="mailto:cfleizach&#64;apple.com" title="chris fleizach &lt;cfleizach&#64;apple.com&gt;"> <span class="fn">chris fleizach</span></a>
</span></b>
        <pre>So our current protect does nothing then?

Can we not just copy the pointer which would take care of the nil pointer access

The other option is to put in more nil checks in some systemic way 

(In reply to <a href="show_bug.cgi?id=161276#c9">comment #9</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=161276#c8">comment #8</a>)
&gt; &gt; (In reply to <a href="show_bug.cgi?id=161276#c7">comment #7</a>)
&gt; &gt; &gt; (In reply to <a href="show_bug.cgi?id=161276#c6">comment #6</a>)
&gt; &gt; &gt; &gt; Maybe we can just do
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; RenderObject protect(mrenderer)
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Then access it everywhere with
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; protect.isBR() and likewise with dot operator
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; 
&gt; &gt; &gt; Why would this work? A reference is just an alia of the object and the
&gt; &gt; &gt; object can still be nulled during this function, right? And C++ has
&gt; &gt; &gt; undefined behavior on null reference, it will also cause crash?
&gt; &gt; 
&gt; &gt; I see a number of examples like this
&gt; &gt; 
&gt; &gt;    Ref&lt;Element&gt; protect(*element);
&gt; &gt; 
&gt; &gt;     bool successfullyFocused = newDocument-&gt;setFocusedElement(element,
&gt; &gt; direction);
&gt; &gt; 
&gt; &gt; It seems however, if we do 
&gt; &gt; RenderObject protect(m_renderer)
&gt; &gt; and then access protect, as an object that would solve our problem. Our
&gt; &gt; problem is now that the pointer inside m_renderer is bad, but rather what
&gt; &gt; m_renderer points to. If we copy what m_renderer pointed to and use that for
&gt; &gt; the duration of the method, it seems like that would work
&gt; 
&gt; I think for the other example, the class is ref counted so we can use Ref&lt;T&gt;
&gt; to hold onto the object. 
&gt; Copying the object itself seems fine but would it affect the performance
&gt; since we are calling this function everywhere? Also when I try to copy the
&gt; object there's an compiler error saying RenderObject is an abstract class.
&gt; Maybe we have to copy the derived class object? But that makes this problem
&gt; more complicated.</span ></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>