Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: WebCore/dom/Element.cpp

Issue 3305027: Merge 66862 - 2010-09-06 Adam Barth <abarth@webkit.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/parser/changing-attrbutes-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/dom/Element.cpp
===================================================================
--- WebCore/dom/Element.cpp (revision 67109)
+++ WebCore/dom/Element.cpp (working copy)
@@ -695,9 +695,12 @@
i++;
}
}
- unsigned len = m_attributeMap->length();
- for (unsigned i = 0; i < len; i++)
- attributeChanged(m_attributeMap->m_attributes[i].get());
+ // Store the set of attributes that changed on the stack in case
+ // attributeChanged mutates m_attributeMap.
+ Vector<RefPtr<Attribute> > attributes;
+ m_attributeMap->copyAttributesToVector(attributes);
+ for (Vector<RefPtr<Attribute> >::iterator iter = attributes.begin(); iter != attributes.end(); ++iter)
+ attributeChanged(iter->get());
// FIXME: What about attributes that were in the old map that are not in the new map?
}
}
« no previous file with comments | « LayoutTests/fast/parser/changing-attrbutes-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698