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

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

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Only perform weak processing of the event handler registry if the document is active. Created 6 years, 8 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 441889f2a9333fa4d77f086554b8cf52d10facf1..fa1fe9d69dc015eedbf60c6869b81d26988356bb 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -178,10 +178,17 @@ Element::~Element()
if (hasSyntheticAttrChildNodes())
detachAllAttrNodesFromElement();
+#if !ENABLE(OILPAN)
+ // With Oilpan, either the Element has been removed from the Document
+ // or the Document is dead as well. If the Element has been removed from
+ // the Document the element has already been removed from the pending
+ // resources. If the document is also dead, there is no need to remove
+ // the element from the pending resources.
if (hasPendingResources()) {
document().accessSVGExtensions().removeElementFromPendingResources(this);
ASSERT(!hasPendingResources());
}
+#endif
}
inline ElementRareData* Element::elementRareData() const

Powered by Google App Engine
This is Rietveld 408576698