Title: [90331] trunk/Source/WebKit2
Revision
90331
Author
[email protected]
Date
2011-07-02 18:15:49 -0700 (Sat, 02 Jul 2011)

Log Message

2011-07-02  Anders Carlsson  <[email protected]>

        Null out the plug-in controller after destroying the plug-in.
        https://bugs.webkit.org/show_bug.cgi?id=63869

        Reviewed by Maciej Stachowiak.

        * PluginProcess/PluginControllerProxy.cpp:
        (WebKit::PluginControllerProxy::destroy):
        Call destroyPlugin.

        * WebProcess/Plugins/Plugin.cpp:
        (WebKit::Plugin::destroyPlugin):
        Call destroy and null out the plug-in controller.

        * WebProcess/Plugins/Plugin.h:
        Add destroyPlugin, make destroy private.

        * WebProcess/Plugins/PluginView.cpp:
        (WebKit::PluginView::~PluginView):
        Call destroyPlugin.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (90330 => 90331)


--- trunk/Source/WebKit2/ChangeLog	2011-07-03 00:57:27 UTC (rev 90330)
+++ trunk/Source/WebKit2/ChangeLog	2011-07-03 01:15:49 UTC (rev 90331)
@@ -1,5 +1,27 @@
 2011-07-02  Anders Carlsson  <[email protected]>
 
+        Null out the plug-in controller after destroying the plug-in.
+        https://bugs.webkit.org/show_bug.cgi?id=63869
+
+        Reviewed by Maciej Stachowiak.
+
+        * PluginProcess/PluginControllerProxy.cpp:
+        (WebKit::PluginControllerProxy::destroy):
+        Call destroyPlugin.
+
+        * WebProcess/Plugins/Plugin.cpp:
+        (WebKit::Plugin::destroyPlugin):
+        Call destroy and null out the plug-in controller.
+
+        * WebProcess/Plugins/Plugin.h:
+        Add destroyPlugin, make destroy private.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::~PluginView):
+        Call destroyPlugin.
+
+2011-07-02  Anders Carlsson  <[email protected]>
+
         Fix Windows build for real.
 
         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:

Modified: trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp (90330 => 90331)


--- trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp	2011-07-03 00:57:27 UTC (rev 90330)
+++ trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp	2011-07-03 01:15:49 UTC (rev 90331)
@@ -137,7 +137,7 @@
     // used as an identifier so it's OK to just get a weak reference.
     Plugin* plugin = m_plugin.get();
 
-    m_plugin->destroy();
+    m_plugin->destroyPlugin();
     m_plugin = 0;
 
     platformDestroy();

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Plugin.cpp (90330 => 90331)


--- trunk/Source/WebKit2/WebProcess/Plugins/Plugin.cpp	2011-07-03 00:57:27 UTC (rev 90330)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Plugin.cpp	2011-07-03 01:15:49 UTC (rev 90331)
@@ -91,4 +91,11 @@
     return initialize(parameters);
 }
 
+void Plugin::destroyPlugin()
+{
+    destroy();
+
+    m_pluginController = 0;
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/Plugins/Plugin.h (90330 => 90331)


--- trunk/Source/WebKit2/WebProcess/Plugins/Plugin.h	2011-07-03 00:57:27 UTC (rev 90330)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Plugin.h	2011-07-03 01:15:49 UTC (rev 90331)
@@ -75,6 +75,9 @@
     // Sets the active plug-in controller and initializes the plug-in.
     bool initialize(PluginController*, const Parameters&);
 
+    // Destroys the plug-in.
+    void destroyPlugin();
+
     // Returns the plug-in controller for this plug-in.
     PluginController* controller() { return m_pluginController; }
 
@@ -86,11 +89,11 @@
     // This is only called by the other initialize overload so it can be made private.
     virtual bool initialize(const Parameters&) = 0;
 
-public:
-
     // Destroys the plug-in.
     virtual void destroy() = 0;
 
+public:
+
     // Tells the plug-in to paint itself into the given graphics context. The passed-in context and
     // dirty rect are in window coordinates. The context is saved/restored by the caller.
     virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect) = 0;

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (90330 => 90331)


--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-07-03 00:57:27 UTC (rev 90330)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2011-07-03 01:15:49 UTC (rev 90331)
@@ -284,7 +284,7 @@
 
     if (m_plugin && m_isInitialized) {
         m_isBeingDestroyed = true;
-        m_plugin->destroy();
+        m_plugin->destroyPlugin();
         m_isBeingDestroyed = false;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to