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

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1517993004: Oilpan: simplify plugin container finalization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify away disconnectContentFrame override Created 5 years 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 | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
index e74496a28d6d739012060c40aabbb06479af9502..321cdf19a2723491d65ee8ef9dd5eeb07acb86de 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -685,17 +685,15 @@ WebPluginContainerImpl::WebPluginContainerImpl(HTMLPlugInElement* element, WebPl
, m_touchEventRequestType(TouchEventRequestTypeNone)
, m_wantsWheelEvents(false)
, m_inDispose(false)
+{
#if ENABLE(OILPAN)
- , m_shouldDisposePlugin(false)
+ ThreadState::current()->registerPreFinalizer(this);
#endif
-{
}
WebPluginContainerImpl::~WebPluginContainerImpl()
{
#if ENABLE(OILPAN)
- if (m_shouldDisposePlugin)
- dispose();
// The plugin container must have been disposed of by now.
ASSERT(!m_webPlugin);
#else
@@ -724,21 +722,6 @@ void WebPluginContainerImpl::dispose()
m_element = nullptr;
}
-#if ENABLE(OILPAN)
-void WebPluginContainerImpl::shouldDisposePlugin()
-{
- // If the LocalFrame is still alive, but the plugin element isn't, the
- // LocalFrame will set m_shouldDisposePlugin via its weak pointer
- // callback. This is a signal that the plugin container
- // must dispose of its plugin when finalizing. The LocalFrame and
- // all objects accessible from it can safely be accessed, but not
- // the plugin element itself.
- ASSERT(!m_shouldDisposePlugin);
- m_shouldDisposePlugin = true;
- m_element = nullptr;
-}
-#endif
-
DEFINE_TRACE(WebPluginContainerImpl)
{
visitor->trace(m_element);
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698