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

Unified Diff: Source/core/dom/Element.cpp

Issue 341273006: Protect an element while removing an attribute. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index b0b07eb1aeff28a2aa0bfc1f950aafa6d18b7bf6..89f8e9f9e4dc381b6fc62ea4c22703b3d43f1a16 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -2861,6 +2861,7 @@ void Element::didModifyAttribute(const QualifiedName& name, const AtomicString&
void Element::didRemoveAttribute(const QualifiedName& name)
{
+ RefPtr<Element> protect(this);
sof 2014/06/20 18:28:07 Make it Oilpan friendly as "RefPtrWillBeRawPtr<Ele
esprehn 2014/06/20 20:01:31 Does the RefPtr need to be higher up, what about t
Nate Chapin 2014/06/20 20:17:42 I perhaps over-optimized that, will move them to t
attributeChanged(name, nullAtom);
InspectorInstrumentation::didRemoveDOMAttr(this, name.localName());
dispatchSubtreeModifiedEvent();

Powered by Google App Engine
This is Rietveld 408576698