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

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

Issue 1514073002: Oilpan: always limit persisted plugin disposal to PluginViews instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add asserts Created 5 years 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 8f6b0c971926021cadefbd87bfb8ef19a226dbf8..882aed58d675ad61db1d5f7e5f740c59e287ae34 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -94,7 +94,10 @@ DEFINE_TRACE(HTMLPlugInElement)
void HTMLPlugInElement::disconnectContentFrame()
{
if (m_persistedPluginWidget) {
- m_persistedPluginWidget->dispose();
+ if (m_persistedPluginWidget->isPluginView())
+ m_persistedPluginWidget->dispose();
+ else
+ ASSERT(m_persistedPluginWidget->isFrameView());
m_persistedPluginWidget = nullptr;
}
HTMLFrameOwnerElement::disconnectContentFrame();
@@ -115,8 +118,12 @@ void HTMLPlugInElement::setPersistedPluginWidget(Widget* widget)
unregisterAsRenderlessIfNeeded();
registerAsRenderless(widget);
if (m_persistedPluginWidget) {
- m_persistedPluginWidget->hide();
- m_persistedPluginWidget->dispose();
+ if (m_persistedPluginWidget->isPluginView()) {
+ m_persistedPluginWidget->hide();
+ m_persistedPluginWidget->dispose();
+ } else {
+ ASSERT(m_persistedPluginWidget->isFrameView());
+ }
}
#endif
m_persistedPluginWidget = widget;
« 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