Chromium Code Reviews| Index: Source/core/html/HTMLFormElement.cpp |
| diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp |
| index 089fde6522475add928e10b5772f182147afaf8d..de1c2287183f3bc749cd30b3f08386011442bdca 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); |
|
wibling-chromium
2014/04/24 14:43:06
Perhaps augment the comment to say that in oilpan
Mads Ager (chromium)
2014/04/25 10:58:25
Yeah, I have moved this code to removedFrom. Based
|
| +#endif |
| } |
| bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style) |
| @@ -159,6 +164,9 @@ void HTMLFormElement::removedFrom(ContainerNode* insertionPoint) |
| notifyFormRemovedFromTree(images, root); |
| } |
| } |
| +#if ENABLE(OILPAN) |
| + document().formController().willDeleteForm(this); |
| +#endif |
| HTMLElement::removedFrom(insertionPoint); |
| } |