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

Unified Diff: Source/core/html/HTMLPlugInElement.cpp

Issue 357443005: Oilpan: make shutdown of plugin container objects work better. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Conditionally define detach() Created 6 years, 6 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
« no previous file with comments | « no previous file | Source/platform/Widget.h » ('j') | Source/platform/Widget.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | Source/platform/Widget.h » ('j') | Source/platform/Widget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698