Chromium Code Reviews| Index: Source/core/html/HTMLPlugInElement.cpp |
| diff --git a/Source/core/html/HTMLPlugInElement.cpp b/Source/core/html/HTMLPlugInElement.cpp |
| index 7cbceed497d6f92c8284a45e0b9d34c51c0a7470..02c8534baabeb9118c2be06a2ac17d8cdc9f905f 100644 |
| --- a/Source/core/html/HTMLPlugInElement.cpp |
| +++ b/Source/core/html/HTMLPlugInElement.cpp |
| @@ -33,6 +33,7 @@ |
| #include "core/events/Event.h" |
| #include "core/frame/FrameView.h" |
| #include "core/frame/LocalFrame.h" |
| +#include "core/frame/Settings.h" |
| #include "core/frame/csp/ContentSecurityPolicy.h" |
| #include "core/html/HTMLContentElement.h" |
| #include "core/html/HTMLImageLoader.h" |
| @@ -40,7 +41,6 @@ |
| #include "core/loader/FrameLoaderClient.h" |
| #include "core/page/EventHandler.h" |
| #include "core/page/Page.h" |
| -#include "core/frame/Settings.h" |
| #include "core/plugins/PluginView.h" |
| #include "core/rendering/RenderEmbeddedObject.h" |
| #include "core/rendering/RenderImage.h" |
| @@ -201,6 +201,10 @@ void HTMLPlugInElement::detach(const AttachContext& context) |
| Widget* plugin = ownedWidget(); |
| if (plugin && plugin->pluginShouldPersist()) |
| m_persistedPluginWidget = plugin; |
| +#if ENABLE(OILPAN) |
| + else if (plugin) |
| + plugin->detach(); |
|
haraken
2014/06/25 05:40:16
Is it OK to detach the plugin that is persisted by
sof
2014/06/25 07:09:32
We don't any kind of detachment in the non-Oilpan
sof
2014/06/25 09:23:50
I don't think we should do this as part of this CL
haraken
2014/06/25 09:31:05
Makes sense, agreed.
|
| +#endif |
|
haraken
2014/06/25 05:40:16
if (plugin) {
#if ENABLE(OILPAN)
plugin->detach(
|
| resetInstance(); |
| // FIXME - is this next line necessary? |
| setWidget(nullptr); |
| @@ -276,8 +280,13 @@ SharedPersistent<v8::Object>* HTMLPlugInElement::pluginWrapper() |
| else |
| plugin = pluginWidget(); |
| - if (plugin) |
| + if (plugin) { |
| m_pluginWrapper = frame->script().createPluginWrapper(plugin); |
| +#if ENABLE(OILPAN) |
| + plugin->setScriptController(&frame->script()); |
| +#endif |
| + } |
| + |
| } |
| return m_pluginWrapper.get(); |
| } |