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

Unified Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp

Issue 1422503009: Oilpan: insist on persisted plugin disposal upon clearing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
index 68bb358424d0d09ef2c4d574c809b0cdd2a4eb5c..15d82af2929e9db8bedd87afde10ef58787f2464 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -114,6 +114,8 @@ void HTMLPlugInElement::setPersistedPluginWidget(Widget* widget)
#if ENABLE(OILPAN)
unregisterAsRenderlessIfNeeded();
registerAsRenderless(widget);
+ if (m_persistedPluginWidget)
+ m_persistedPluginWidget->dispose();
#endif
m_persistedPluginWidget = widget;
}
@@ -124,10 +126,6 @@ bool HTMLPlugInElement::unregisterAsRenderlessIfNeeded()
if (!m_persistedPluginWidget || !m_persistedPluginWidget->isPluginView())
return false;
- // If we are in a renderer-less state, keep the registration.
- if (!layoutEmbeddedObject())
- return false;
-
LocalFrame* frame = toPluginView(m_persistedPluginWidget.get())->pluginFrame();
ASSERT(frame);
frame->unregisterPluginElement(this);
@@ -148,7 +146,9 @@ void HTMLPlugInElement::registerAsRenderless(Widget* widget)
PassRefPtrWillBeRawPtr<Widget> HTMLPlugInElement::releasePersistedPluginWidget()
{
#if ENABLE(OILPAN)
- unregisterAsRenderlessIfNeeded();
+ // If we are in a renderer-less state, keep the registration.
+ if (layoutEmbeddedObject())
+ unregisterAsRenderlessIfNeeded();
#endif
return m_persistedPluginWidget.release();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698