[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:17:52 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0a3771cb3e0ab4bb37899d15a466353d99c23835
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 30 19:19:35 2002 +0000

            Reviewed by Don and Ken.
    
    	- fixed 3136797 -- crash when Adobe SVG Viewer plug-in puts up modal dialog
    
            * Plugins.subproj/WebBaseNetscapePluginView.h: Add inSetWindow boolean.
            * Plugins.subproj/WebBaseNetscapePluginView.m:
            (-[WebBaseNetscapePluginView sendEvent:]): Don't send any events to a plug-in while it's
    	inside NPP_SetWindow. We don't want to implement more general reentrancy protection, because
    	it could cause trouble for plugins that can handle it correctly, but it's unlikely that any
    	legitimate use would require reentrant calls while inside NPP_SetWindow, and that's the case
    	that crashes for the SVG viewer plug-in when it presents its registration dialog.
            (-[WebBaseNetscapePluginView setWindow]): Set boolean.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3210 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 3c8820a..5c55438 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,18 @@
+2002-12-30  Darin Adler  <darin at apple.com>
+
+        Reviewed by Don and Ken.
+
+	- fixed 3136797 -- crash when Adobe SVG Viewer plug-in puts up modal dialog
+
+        * Plugins.subproj/WebBaseNetscapePluginView.h: Add inSetWindow boolean.
+        * Plugins.subproj/WebBaseNetscapePluginView.m:
+        (-[WebBaseNetscapePluginView sendEvent:]): Don't send any events to a plug-in while it's
+	inside NPP_SetWindow. We don't want to implement more general reentrancy protection, because
+	it could cause trouble for plugins that can handle it correctly, but it's unlikely that any
+	legitimate use would require reentrant calls while inside NPP_SetWindow, and that's the case
+	that crashes for the SVG viewer plug-in when it presents its registration dialog.
+        (-[WebBaseNetscapePluginView setWindow]): Set boolean.
+
 2002-12-29  Darin Adler  <darin at apple.com>
 
         Reviewed by Don.
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
index 56ffca3..07fffd1 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.h
@@ -30,8 +30,8 @@
     NPP_t instanceStruct;
 
     BOOL canRestart;
-    BOOL isHidden;
     BOOL isStarted;
+    BOOL inSetWindow;
             
     NSString *MIMEType;
     NSURL *baseURL;
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index 9b177bd..cfa2c1d 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -259,6 +259,14 @@ typedef struct {
         return NO;
     }
     
+    // Make sure we don't call NPP_HandleEvent while we're inside NPP_SetWindow.
+    // We probably don't want more general reentrancy protection; we are really
+    // protecting only against this one case, which actually comes up when
+    // you first install the SVG viewer plug-in.
+    if (inSetWindow) {
+        return NO;
+    }
+
     BOOL defers = [[self controller] _defersCallbacks];
     if (!defers) {
         [[self controller] _setDefersCallbacks:YES];
@@ -566,8 +574,15 @@ typedef struct {
     
     PortState portState = [self saveAndSetPortState];
 
+    // Make sure we don't call NPP_HandleEvent while we're inside NPP_SetWindow.
+    // We probably don't want more general reentrancy protection; we are really
+    // protecting only against this one case, which actually comes up when
+    // you first install the SVG viewer plug-in.
     NPError npErr;
+    ASSERT(!inSetWindow);
+    inSetWindow = YES;
     npErr = NPP_SetWindow(instance, &window);
+    inSetWindow = NO;
     LOG(Plugins, "NPP_SetWindow: %d, port=0x%08x, window.x:%d window.y:%d",
         npErr, (int)nPort.port, (int)window.x, (int)window.y);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list