<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>136333</bug_id>
          
          <creation_ts>2014-08-27 23:28:33 -0700</creation_ts>
          <short_desc>AX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse</short_desc>
          <delta_ts>2014-08-28 11:01:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="chris fleizach">cfleizach</reporter>
          <assigned_to name="chris fleizach">cfleizach</assigned_to>
          <cc>aboxhall</cc>
    
    <cc>apinheiro</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dmazzoni</cc>
    
    <cc>jcraig</cc>
    
    <cc>jdiggs</cc>
    
    <cc>mario</cc>
    
    <cc>samuel_white</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1031920</commentid>
    <comment_count>0</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2014-08-27 23:28:33 -0700</bug_when>
    <thetext>(lldb) bt
* thread #1: tid = 0x12d68, 0x000000010adae22a JavaScriptCore`WTFCrash + 42 at Assertions.cpp:329, queue = &apos;com.apple.main-thread&apos;, stop reason = EXC_BAD_ACCESS (code=1, address=0xbbadbeef)
  * frame #0: 0x000000010adae22a JavaScriptCore`WTFCrash + 42 at Assertions.cpp:329
    frame #1: 0x000000010eb5f586 WebCore`WebCore::Node::treeScope(this=0x00007f9e4afcded0) const + 70 at Node.h:401
    frame #2: 0x000000010eb5a603 WebCore`WebCore::Node::document(this=0x00007f9e4afcded0) const + 83 at Node.h:396
    frame #3: 0x000000010eb2ebb5 WebCore`WebCore::AXObjectCache::clearTextMarkerNodesInUse(this=0x00007f9e3bc20b30, document=0x0000000000000000) + 149 at AXObjectCache.cpp:1051
    frame #4: 0x000000010f3f2fa2 WebCore`WebCore::Frame::disconnectOwnerElement(this=0x00007f9e4b7af2f0) + 114 at Frame.cpp:814
    frame #5: 0x000000010f3f2745 WebCore`WebCore::Frame::~Frame(this=0x00007f9e4b7af2f0) + 149 at Frame.cpp:224
    frame #6: 0x000000010f3f3005 WebCore`WebCore::Frame::~Frame(this=0x00007f9e4b7af2f0) + 21 at Frame.cpp:214
    frame #7: 0x000000010f3f3029 WebCore`WebCore::Frame::~Frame(this=0x00007f9e4b7af2f0) + 25 at Frame.cpp:214
    frame #8: 0x000000010ebbd1f3 WebCore`WTF::RefCounted&lt;WebCore::Frame&gt;::deref(this=0x00007f9e4b7af2f8) + 83 at RefCounted.h:146
    frame #9: 0x000000010ebbd18f WebCore`WTF::Ref&lt;WebCore::Frame&gt;::~Ref(this=0x00007fff556c6e58) + 31 at Ref.h:41
    frame #10: 0x000000010ebb5fc5 WebCore`WTF::Ref&lt;WebCore::Frame&gt;::~Ref(this=0x00007fff556c6e58) + 21 at Ref.h:41
    frame #11: 0x000000010f417e1f WebCore`WTF::VectorDestructor&lt;true, WTF::Ref&lt;WebCore::Frame&gt; &gt;::destruct(begin=0x00007fff556c6e58, end=0x00007fff556c6e70) + 47 at Vector.h:56
    frame #12: 0x000000010f417ddd WebCore`WTF::VectorTypeOperations&lt;WTF::Ref&lt;WebCore::Frame&gt; &gt;::destruct(begin=0x00007fff556c6e58, end=0x00007fff556c6e70) + 29 at Vector.h:220
    frame #13: 0x000000010f417d50 WebCore`WTF::Vector&lt;WTF::Ref&lt;WebCore::Frame&gt;, 16ul, WTF::CrashOnOverflow&gt;::shrink(this=0x00007fff556c6e48, size=0) + 128 at Vector.h:957
    frame #14: 0x000000010f417cb4 WebCore`WTF::Vector&lt;WTF::Ref&lt;WebCore::Frame&gt;, 16ul, WTF::CrashOnOverflow&gt;::~Vector(this=0x00007fff556c6e48) + 52 at Vector.h:596
    frame #15: 0x000000010f416535 WebCore`WTF::Vector&lt;WTF::Ref&lt;WebCore::Frame&gt;, 16ul, WTF::CrashOnOverflow&gt;::~Vector(this=0x00007fff556c6e48) + 21 at Vector.h:594
    frame #16: 0x000000010f402055 WebCore`WebCore::FrameLoader::detachChildren(this=0x00007f9e435b0ff0) + 309 at FrameLoader.cpp:2415


&lt;rdar://problem/17030054&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1031925</commentid>
    <comment_count>1</comment_count>
      <attachid>237294</attachid>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2014-08-27 23:33:16 -0700</bug_when>
    <thetext>Created attachment 237294
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1031955</commentid>
    <comment_count>2</comment_count>
      <attachid>237294</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2014-08-28 04:10:10 -0700</bug_when>
    <thetext>Comment on attachment 237294
patch

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

r=me but please consider the comment below.

&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1051
&gt; +        if (node-&gt;inDocument() &amp;&amp; &amp;(node)-&gt;document() == document)

Is there a reason to keep nodes not in a document in m_textMarkerNodes?  Just wondering if this condition should be || instead of &amp;&amp; (and negated) since we might build up document-less nodes in the cache over time with the !document early return above:

        If (!node-&gt;inDocument() || &amp;node-&gt;document() == document)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1032030</commentid>
    <comment_count>3</comment_count>
      <attachid>237294</attachid>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2014-08-28 10:51:21 -0700</bug_when>
    <thetext>Comment on attachment 237294
patch

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

&gt;&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1051
&gt;&gt; +        if (node-&gt;inDocument() &amp;&amp; &amp;(node)-&gt;document() == document)
&gt; 
&gt; Is there a reason to keep nodes not in a document in m_textMarkerNodes?  Just wondering if this condition should be || instead of &amp;&amp; (and negated) since we might build up document-less nodes in the cache over time with the !document early return above:
&gt; 
&gt;         If (!node-&gt;inDocument() || &amp;node-&gt;document() == document)

I think your logic makes sense here. I&apos;m gonna go in that direction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1032033</commentid>
    <comment_count>4</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2014-08-28 11:01:15 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/173067</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>237294</attachid>
            <date>2014-08-27 23:33:16 -0700</date>
            <delta_ts>2014-08-28 10:51:21 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <size>2120</size>
            <attacher name="chris fleizach">cfleizach</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE3MzA1MykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE4IEBACisyMDE0LTA4LTI3ICBDaHJpcyBG
bGVp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0ID0gbm9kZXNUb0RlbGV0ZS5iZWdpbigpOwotICAgIGVuZCA9IG5v
ZGVzVG9EZWxldGUuZW5kKCk7Ci0gICAgZm9yICg7IGl0ICE9IGVuZDsgKytpdCkKLSAgICAgICAg
bV90ZXh0TWFya2VyTm9kZXMucmVtb3ZlKCppdCk7CisgICAgZm9yIChjb25zdCBhdXRvJiBub2Rl
IDogbm9kZXNUb0RlbGV0ZSkKKyAgICAgICAgbV90ZXh0TWFya2VyTm9kZXMucmVtb3ZlKG5vZGUp
OwogfQogICAgIAogYm9vbCBBWE9iamVjdENhY2hlOjpub2RlSXNUZXh0Q29udHJvbChjb25zdCBO
b2RlKiBub2RlKQo=
</data>
<flag name="review"
          id="262016"
          type_id="1"
          status="+"
          setter="ddkilzer"
    />
    <flag name="commit-queue"
          id="262027"
          type_id="3"
          status="-"
          setter="ddkilzer"
    />
          </attachment>
      

    </bug>

</bugzilla>