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

Unified Diff: Source/web/FrameLoaderClientImpl.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/FrameLoaderClientImpl.cpp
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
index 31a7932266ab4c94ddc19e33311e3250fe2d200f..0826507c799ceab47c056fcba32711671fe9855e 100644
--- a/Source/web/FrameLoaderClientImpl.cpp
+++ b/Source/web/FrameLoaderClientImpl.cpp
@@ -661,7 +661,7 @@ PassOwnPtrWillBeRawPtr<PluginPlaceholder> FrameLoaderClientImpl::createPluginPla
return PluginPlaceholderImpl::create(webPluginPlaceholder.release(), document);
}
-PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
+PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createPlugin(
HTMLPlugInElement* element,
const KURL& url,
const Vector<String>& paramNames,
@@ -685,19 +685,27 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
return nullptr;
// The container takes ownership of the WebPlugin.
- RefPtr<WebPluginContainerImpl> container =
+ RefPtrWillBeRawPtr<WebPluginContainerImpl> container =
WebPluginContainerImpl::create(element, webPlugin);
- if (!webPlugin->initialize(container.get()))
+ if (!webPlugin->initialize(container.get())) {
+#if ENABLE(OILPAN)
+ container->dispose();
+#endif
return nullptr;
+ }
- if (policy != AllowDetachedPlugin && !element->renderer())
+ if (policy != AllowDetachedPlugin && !element->renderer()) {
+#if ENABLE(OILPAN)
+ container->dispose();
+#endif
return nullptr;
+ }
return container;
}
-PassRefPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget(
+PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget(
HTMLAppletElement* element,
const KURL& /* baseURL */,
const Vector<String>& paramNames,

Powered by Google App Engine
This is Rietveld 408576698