Title: [114883] trunk/Source/WebCore
- Revision
- 114883
- Author
- kl...@webkit.org
- Date
- 2012-04-23 03:17:23 -0700 (Mon, 23 Apr 2012)
Log Message
REGRESSION(r114870): Assertion failure in ElementAttributeData::setAttr().
<http://webkit.org/b/84581>
Reviewed by Antti Koivisto.
Attach the Attr and bump m_attrCount manually in ensureAttr() instead of calling
setAttr(). The latter asserts that the Attr isn't present in the map, which
obviously isn't true after we've just added it.
This has the added effect of removing one unnecessary hash lookup.
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::ensureAttr):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114882 => 114883)
--- trunk/Source/WebCore/ChangeLog 2012-04-23 09:42:55 UTC (rev 114882)
+++ trunk/Source/WebCore/ChangeLog 2012-04-23 10:17:23 UTC (rev 114883)
@@ -1,3 +1,19 @@
+2012-04-23 Andreas Kling <kl...@webkit.org>
+
+ REGRESSION(r114870): Assertion failure in ElementAttributeData::setAttr().
+ <http://webkit.org/b/84581>
+
+ Reviewed by Antti Koivisto.
+
+ Attach the Attr and bump m_attrCount manually in ensureAttr() instead of calling
+ setAttr(). The latter asserts that the Attr isn't present in the map, which
+ obviously isn't true after we've just added it.
+
+ This has the added effect of removing one unnecessary hash lookup.
+
+ * dom/ElementAttributeData.cpp:
+ (WebCore::ElementAttributeData::ensureAttr):
+
2012-04-23 Pavel Feldman <pfeld...@chromium.org>
Web Inspector: make ParsedURL.prototype.displayName data url friendly.
Modified: trunk/Source/WebCore/dom/ElementAttributeData.cpp (114882 => 114883)
--- trunk/Source/WebCore/dom/ElementAttributeData.cpp 2012-04-23 09:42:55 UTC (rev 114882)
+++ trunk/Source/WebCore/dom/ElementAttributeData.cpp 2012-04-23 10:17:23 UTC (rev 114883)
@@ -50,8 +50,10 @@
{
AttrMap::AddResult result = attrMap().add(std::make_pair(element, name), 0);
if (result.isNewEntry) {
- result.iterator->second = Attr::create(element, name);
- setAttr(element, name, result.iterator->second.get());
+ RefPtr<Attr> attr = Attr::create(element, name);
+ attr->attachToElement(element);
+ result.iterator->second = attr.release();
+ ++m_attrCount;
}
return result.iterator->second.get();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes