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

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: Rebase again. 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/html/HTMLFormElement.cpp
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
index 089fde6522475add928e10b5772f182147afaf8d..0c891b1e308b39d05eaf839d10280673c1d284ad 100644
--- a/Source/core/html/HTMLFormElement.cpp
+++ b/Source/core/html/HTMLFormElement.cpp
@@ -82,7 +82,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
haraken 2014/04/24 04:18:43 I don't think you need to do this in this CL, but
Mads Ager (chromium) 2014/04/24 10:57:36 Yeah, this is one of the changes that I would pref
}
bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
@@ -160,6 +165,9 @@ void HTMLFormElement::removedFrom(ContainerNode* insertionPoint)
}
}
HTMLElement::removedFrom(insertionPoint);
+#if ENABLE(OILAPN)
+ document().formController().willDeleteForm(this);
+#endif
haraken 2014/04/24 04:18:43 I'd put this before calling HTMLElement::removedFr
Mads Ager (chromium) 2014/04/24 10:57:36 Done.
}
void HTMLFormElement::handleLocalEvents(Event* event)

Powered by Google App Engine
This is Rietveld 408576698