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); |
} |