| Index: Source/web/FrameLoaderClientImpl.cpp
|
| diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
|
| index 8c2d6826ff54206687e76743271e7ee22987a949..2c98c8a1823f2ed4b822230b28a90e7373d8d608 100644
|
| --- a/Source/web/FrameLoaderClientImpl.cpp
|
| +++ b/Source/web/FrameLoaderClientImpl.cpp
|
| @@ -636,7 +636,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,
|
| @@ -660,19 +660,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,
|
|
|