[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aroben at apple.com aroben at apple.com
Wed Dec 22 15:03:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d9839199917f2675f8d8a2a563ec209bcf2e51f5
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 27 19:05:54 2010 +0000

    Don't allow setting NetscapePlugin::m_isWindowed after NPP_New has completed
    
    In Firefox, Chrome, and WebKit1 trying to set this value after NPP_New
    does not actually affect whether the plugin is windowed.
    
    Fixes <http://webkit.org/b/46673> <rdar://problem/8484211> Assertion
    failure in NetscapePlugin::platformDestroy when running
    plugins/mouse-events.html in WebKit2 on Windows
    
    Reviewed by Anders Carlsson.
    
    * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
    (WebKit::NetscapePlugin::setIsWindowed): Moved here from the header.
    Bail out if m_isStarted is true, indicating that NPP_New has already
    finished.
    
    * WebProcess/Plugins/Netscape/NetscapePlugin.h: Removed the
    implementation of setIsWindowed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70685 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 79fdb4f..91d4251 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,25 @@
+2010-10-27  Adam Roben  <aroben at apple.com>
+
+        Don't allow setting NetscapePlugin::m_isWindowed after NPP_New has
+        completed
+
+        In Firefox, Chrome, and WebKit1 trying to set this value after NPP_New
+        does not actually affect whether the plugin is windowed.
+
+        Fixes <http://webkit.org/b/46673> <rdar://problem/8484211> Assertion
+        failure in NetscapePlugin::platformDestroy when running
+        plugins/mouse-events.html in WebKit2 on Windows
+
+        Reviewed by Anders Carlsson.
+
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::setIsWindowed): Moved here from the header.
+        Bail out if m_isStarted is true, indicating that NPP_New has already
+        finished.
+
+        * WebProcess/Plugins/Netscape/NetscapePlugin.h: Removed the
+        implementation of setIsWindowed.
+
 2010-10-27  Timothy Hatcher  <timothy at apple.com>
 
         Add API for enabling the developer extras (Web Inspector).
diff --git a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
index 39968af..3910743 100644
--- a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
+++ b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
@@ -151,6 +151,17 @@ NPError NetscapePlugin::destroyStream(NPStream* stream, NPReason reason)
     return pluginStream->destroy(reason);
 }
 
+void NetscapePlugin::setIsWindowed(bool isWindowed)
+{
+    // Once the plugin has started, it's too late to change whether the plugin is windowed or not.
+    // (This is true in Firefox and Chrome, too.) Disallow setting m_isWindowed in that case to
+    // keep our internal state consistent.
+    if (m_isStarted)
+        return;
+
+    m_isWindowed = isWindowed;
+}
+
 void NetscapePlugin::setStatusbarText(const String& statusbarText)
 {
     m_pluginController->setStatusbarText(statusbarText);
diff --git a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
index f87fa62..fda5350 100644
--- a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
+++ b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
@@ -68,7 +68,7 @@ public:
     void loadURL(const String& method, const String& urlString, const String& target, const WebCore::HTTPHeaderMap& headerFields,
                  const Vector<uint8_t>& httpBody, bool sendNotification, void* notificationData);
     NPError destroyStream(NPStream*, NPReason);
-    void setIsWindowed(bool windowed) { m_isWindowed = windowed; }
+    void setIsWindowed(bool);
     void setStatusbarText(const String&);
     static void setException(const String&);
     bool evaluate(NPObject*, const String&scriptString, NPVariant* result);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list