<?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>109976</bug_id>
          
          <creation_ts>2013-02-15 15:00:16 -0800</creation_ts>
          <short_desc>Calling DOM Element.attributes shouldn&apos;t force creation of ElementData.</short_desc>
          <delta_ts>2013-03-15 12:01:14 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>110026</dependson>
          <blocked>109505</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Kling">kling</reporter>
          <assigned_to name="Andreas Kling">kling</assigned_to>
          <cc>cmarcelo</cc>
    
    <cc>darin</cc>
    
    <cc>kling</cc>
    
    <cc>ojan.autocc</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>834407</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-02-15 15:00:16 -0800</bug_when>
    <thetext>We shouldn&apos;t construct ElementData &quot;just to have some&quot; when Element.attributes is called via DOM API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834409</commentid>
    <comment_count>1</comment_count>
      <attachid>188649</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-02-15 15:03:05 -0800</bug_when>
    <thetext>Created attachment 188649
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834468</commentid>
    <comment_count>2</comment_count>
      <attachid>188649</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-15 16:21:41 -0800</bug_when>
    <thetext>Comment on attachment 188649
Patch

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

&gt; Source/WebCore/dom/Element.cpp:-316
&gt; -    ensureElementDataWithSynchronizedAttributes();

Why was this here before? Was this just a misunderstanding?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834469</commentid>
    <comment_count>3</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-02-15 16:23:12 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 188649 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=188649&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/dom/Element.cpp:-316
&gt; &gt; -    ensureElementDataWithSynchronizedAttributes();
&gt; 
&gt; Why was this here before? Was this just a misunderstanding?

Yeah looks like it. Though if we just removed that, NamedNodeMap::length() would crash with a null pointer dereference in Element::attributeCount().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834546</commentid>
    <comment_count>4</comment_count>
      <attachid>188649</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-02-15 17:40:59 -0800</bug_when>
    <thetext>Comment on attachment 188649
Patch

Clearing flags on attachment: 188649

Committed r143076: &lt;http://trac.webkit.org/changeset/143076&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834547</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-02-15 17:41:03 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834792</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-02-16 13:22:16 -0800</bug_when>
    <thetext>This patch caused a crash on acid3:

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20-%20webkit.org&amp;tests=http%2Ftests%2Fmisc%2Facid3.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834794</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-02-16 13:23:55 -0800</bug_when>
    <thetext>http://build.webkit.org/results/Apple%20MountainLion%20Release%20WK1%20(Tests)/r143107%20(6917)/http/tests/misc/acid3-crash-log.txt

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x000000010e1e9c8b WebCore::NamedNodeMap::removeNamedItemNS(WTF::AtomicString const&amp;, WTF::AtomicString const&amp;, int&amp;) + 59 (Element.h:88)
1   com.apple.WebCore             	0x000000010dff54e6 WebCore::jsNamedNodeMapPrototypeFunctionRemoveNamedItemNS(JSC::ExecState*) + 518 (JSNamedNodeMap.cpp:367)
2   ???                           	0x00002848d2001045 0 + 44293225975877
3   com.apple.JavaScriptCore      	0x000000010d0b9693 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 611 (JSCJSValueInlines.h:363)
4   com.apple.JavaScriptCore      	0x000000010cfbe765 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 69 (CallData.cpp:40)
5   com.apple.WebCore             	0x000000010de6595e WebCore::JSMainThreadExecState::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&amp;, JSC::JSValue, JSC::ArgList const&amp;) + 190 (JSMainThreadExecState.h:56)
6   com.apple.WebCore             	0x000000010e3eee51 WebCore::ScheduledAction::executeFunctionInContext(JSC::JSGlobalObject*, JSC::JSValue, WebCore::ScriptExecutionContext*) + 529 (ScheduledAction.cpp:112)
7   com.apple.WebCore             	0x000000010e3eeabc WebCore::ScheduledAction::execute(WebCore::Document*) + 156 (ScheduledAction.cpp:134)
8   com.apple.WebCore             	0x000000010db6cba4 WebCore::DOMTimer::fired() + 388 (InspectorInstrumentation.h:289)
9   com.apple.WebCore             	0x000000010e5c60af WebCore::ThreadTimers::sharedTimerFiredInternal() + 175 (ThreadTimers.cpp:132)
10  com.apple.WebCore             	0x000000010e452f03 WebCore::timerFired(__CFRunLoopTimer*, void*) + 51 (SharedTimerMac.mm:167)
11  com.apple.CoreFoundation      	0x00007fff8ee2eda4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
12  com.apple.CoreFoundation      	0x00007fff8ee2e8bd __CFRunLoopDoTimer + 557
13  com.apple.CoreFoundation      	0x00007fff8ee14099 __CFRunLoopRun + 1513</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834797</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-02-16 13:28:21 -0800</bug_when>
    <thetext>Re-opened since this is blocked by bug 110026</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834800</commentid>
    <comment_count>9</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-02-16 13:31:00 -0800</bug_when>
    <thetext>Looks like the Acid3 bug is the same thing we are discussing in bug 110019. Too bad we missed our chance to just fix that instead of rolling this out!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834802</commentid>
    <comment_count>10</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-02-16 13:33:11 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; Looks like the Acid3 bug is the same thing we are discussing in bug 110019. Too bad we missed our chance to just fix that instead of rolling this out!

We don&apos;t necessarily have to roll this out, it&apos;s just my personal preference to roll out and roll back in with everything in the right place when possible. Mostly because it makes SVN archaeology a bit easier later on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834806</commentid>
    <comment_count>11</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-02-16 13:35:44 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; Looks like the Acid3 bug is the same thing we are discussing in bug 110019. Too bad we missed our chance to just fix that instead of rolling this out!
&gt; 
&gt; We don&apos;t necessarily have to roll this out, it&apos;s just my personal preference to roll out and roll back in with everything in the right place when possible. Mostly because it makes SVN archaeology a bit easier later on.

That said, there&apos;s already a copy of ACID3 in the LayoutTests tree, so my comment about adding a test in 110019 (the sole reason for rejecting that patch) doesn&apos;t even apply. I&apos;ll r+, cq+ that instead.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>188649</attachid>
            <date>2013-02-15 15:03:05 -0800</date>
            <delta_ts>2013-02-15 17:40:59 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-109976.diff</filename>
            <type>text/plain</type>
            <size>2086</size>
            <attacher name="Andreas Kling">kling</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBmOGU3YjBiLi44MjM5NmRhIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDUgKzEsMjUg
QEAKIDIwMTMtMDItMTUgIEFuZHJlYXMgS2xpbmcgIDxha2xpbmdAYXBwbGUuY29tPgogCisgICAg
ICAgIENhbGxpbmcgRE9NIEVsZW1lbnQuYXR0cmlidXRlcyBzaG91bGRuJ3QgZm9yY2UgY3JlYXRp
b24gb2YgRWxlbWVudERhdGEuCisgICAgICAgIDxodHRwOi8vd2Via2l0Lm9yZy9iLzEwOTk3Nj4K
KworICAgICAgICBSZXZpZXdlZCB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