[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:16:16 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c36bf7d067b2cf4f3d851c3fc5f16dfe02bfbec7
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 18 11:47:22 2002 +0000

            Reviewed by Maciej.
    
    	- fixed 3098293 -- Shockwave plug-in doesn't work
    
    	The problem is that the Shockwave plug-in depends on being able to do LMGetCurApRefNum
    	and then do a PBGetFCBInfoSync on the result, and if it gets an error it will refuse
    	to initialize.
    
            * Plugins.subproj/WebNetscapePluginPackage.m: (+[WebNetscapePluginPackage initialize]):
    	Supply a bogus CurApRefNum. Do it only if CurApRefNum is -1, so we don't screw things
    	up if we are used in a Carbon application.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3120 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ac84732..a973c1c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2002-12-18  Darin Adler  <darin at apple.com>
+
+        Reviewed by Maciej.
+
+	- fixed 3098293 -- Shockwave plug-in doesn't work
+
+	The problem is that the Shockwave plug-in depends on being able to do LMGetCurApRefNum
+	and then do a PBGetFCBInfoSync on the result, and if it gets an error it will refuse
+	to initialize.
+
+        * Plugins.subproj/WebNetscapePluginPackage.m: (+[WebNetscapePluginPackage initialize]):
+	Supply a bogus CurApRefNum. Do it only if CurApRefNum is -1, so we don't screw things
+	up if we are used in a Carbon application.
+
 2002-12-17  Darin Adler  <darin at apple.com>
 
         Reviewed by Trey.
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginPackage.m b/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
index cfd5207..4c80100 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
@@ -14,6 +14,22 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
 
 @implementation WebNetscapePluginPackage
 
++ (void)initialize
+{
+    // The Shockwave plugin requires a valid file in CurApRefNum.
+    // But it doesn't seem to matter what file it is.
+    // If we're called inside a Cocoa application which won't have a
+    // CurApRefNum, we set it to point to the system resource file.
+    if (LMGetCurApRefNum() == -1) {
+        // To get the refNum for the system resource file, we have to do
+        // UseResFile(kSystemResFile) and then look at CurResFile().
+        short savedCurResFile = CurResFile();
+        UseResFile(kSystemResFile);
+        LMSetCurApRefNum(CurResFile());
+        UseResFile(savedCurResFile);
+    }
+}
+
 - (SInt16)openResourceFile
 {
     FSRef fref;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list