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

Unified Diff: Source/core/html/HTMLFormElement.cpp

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. 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
« no previous file with comments | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormElement.cpp
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
index 56b0661d1725eb53ac8e65d2b7d241ab7e24342a..e2190df58afc8f892b79f1c533075857d5ba2cac 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -83,7 +83,12 @@ PassRefPtr<HTMLFormElement> HTMLFormElement::create(Document& document)
HTMLFormElement::~HTMLFormElement()
{
+#if !ENABLE(OILPAN)
+ // With Oilpan, either removedFrom is called or the document and
+ // form controller are dead as well and there is no need to remove
+ // this form element from it.
document().formController().willDeleteForm(this);
+#endif
}
bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
@@ -160,6 +165,9 @@ void HTMLFormElement::removedFrom(ContainerNode* insertionPoint)
notifyFormRemovedFromTree(images, root);
}
}
+#if ENABLE(OILPAN)
+ document().formController().willDeleteForm(this);
+#endif
HTMLElement::removedFrom(insertionPoint);
}
« no previous file with comments | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698