| Index: Source/web/FrameLoaderClientImpl.cpp
|
| diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
|
| index dfaa9ec8e58bee949a28f6b4fc1328517b87c543..93742830d0ef6b6c999f1c6e53e720ecb562deea 100644
|
| --- a/Source/web/FrameLoaderClientImpl.cpp
|
| +++ b/Source/web/FrameLoaderClientImpl.cpp
|
| @@ -633,7 +633,7 @@ bool FrameLoaderClientImpl::canCreatePluginWithoutRenderer(const String& mimeTyp
|
| return m_webFrame->client()->canCreatePluginWithoutRenderer(mimeType);
|
| }
|
|
|
| -PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
|
| +PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createPlugin(
|
| HTMLPlugInElement* element,
|
| const KURL& url,
|
| const Vector<String>& paramNames,
|
| @@ -657,19 +657,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,
|
|
|