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

Unified Diff: Source/web/WebHelperPluginImpl.cpp

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch LocalFrame::m_pluginElements rep to HashSet<HTMLPlugInElement*> Created 6 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
Index: Source/web/WebHelperPluginImpl.cpp
diff --git a/Source/web/WebHelperPluginImpl.cpp b/Source/web/WebHelperPluginImpl.cpp
index a86759cf6e17703560e9a96973867079b9f5f179..28c2e0a7b868809aacafafcb49e080e8ced87d47 100644
--- a/Source/web/WebHelperPluginImpl.cpp
+++ b/Source/web/WebHelperPluginImpl.cpp
@@ -57,6 +57,14 @@ WebHelperPluginImpl::WebHelperPluginImpl()
WebHelperPluginImpl::~WebHelperPluginImpl()
{
+#if ENABLE(OILPAN)
+ // FIXME: Oilpan: it is potentially problematic to support plugin
+ // disposal during an Oilpan GC. If it happens, we need to know
+ // and evaluate possible ways to handle it.
+ ASSERT(!ThreadState::current()->isSweepInProgress());
+ if (m_pluginContainer)
+ m_pluginContainer->dispose();
+#endif
}
bool WebHelperPluginImpl::initialize(const String& pluginType, WebLocalFrameImpl* frame)
@@ -69,7 +77,7 @@ bool WebHelperPluginImpl::initialize(const String& pluginType, WebLocalFrameImpl
Vector<String> attributeNames;
Vector<String> attributeValues;
ASSERT(frame->frame()->document()->url().isValid());
- m_pluginContainer = adoptRef(toWebPluginContainerImpl(frame->frame()->loader().client()->createPlugin(
+ m_pluginContainer = adoptRefWillBeNoop(toWebPluginContainerImpl(frame->frame()->loader().client()->createPlugin(
m_objectElement.get(),
frame->frame()->document()->url(),
attributeNames,

Powered by Google App Engine
This is Rietveld 408576698