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

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: 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..d88821c6a6080cfc99dac52c134dc296193ca868 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -94,7 +94,8 @@ DEFINE_TRACE(HTMLPlugInElement)
void HTMLPlugInElement::disconnectContentFrame()
{
if (m_persistedPluginWidget) {
- m_persistedPluginWidget->dispose();
+ if (m_persistedPluginWidget->isPluginView())
+ m_persistedPluginWidget->dispose();
dcheng 2015/12/11 07:47:09 Is the only other possible case here that m_persis
sof 2015/12/11 08:01:18 Yes, I think it is safe to do the disposal uncondi
dcheng 2015/12/11 08:11:22 Let's add an else { ASSERT(m_persistedPluginWidget
m_persistedPluginWidget = nullptr;
}
HTMLFrameOwnerElement::disconnectContentFrame();
@@ -114,7 +115,7 @@ void HTMLPlugInElement::setPersistedPluginWidget(Widget* widget)
#if ENABLE(OILPAN)
unregisterAsRenderlessIfNeeded();
registerAsRenderless(widget);
- if (m_persistedPluginWidget) {
+ if (m_persistedPluginWidget && m_persistedPluginWidget->isPluginView()) {
dcheng 2015/12/11 08:11:22 Ditto, let's split this so we can have an explicit
m_persistedPluginWidget->hide();
m_persistedPluginWidget->dispose();
}
« 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