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

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: RefPtr->RefPtrWillBeRawPtr 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..ea32fe06aae8d5c593de7d6710e43ae867a353ca 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)
{
+ RefPtrWillBeRawPtr<Element> protect(this);
attributeChanged(name, nullAtom);
InspectorInstrumentation::didRemoveDOMAttr(this, name.localName());
dispatchSubtreeModifiedEvent();

Powered by Google App Engine
This is Rietveld 408576698