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

mhay mhay at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:57:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d1e7f90e2124753195009b774791b602620946d9
Author: mhay <mhay at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 4 22:52:48 2002 +0000

            Modified pluginForKey:withEnumeratorSelector: such that we now
            enumerate all plugins that match the given key before we return
            a plugin.  This fixes a bug in which we would sometimes return
            the wrong plugin (according to our preferences) because we did
            not examine all of the available plugins before making our choice.
    
            With this change, Alexander now behaves correctly when we have
            multiple Java plugins in the plugins folder (as we will on user
            systems in the field).
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2552 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Plugins.subproj/WebPluginDatabase.m b/WebKit/Plugins.subproj/WebPluginDatabase.m
index ae9052a..e0b9f74 100644
--- a/WebKit/Plugins.subproj/WebPluginDatabase.m
+++ b/WebKit/Plugins.subproj/WebPluginDatabase.m
@@ -30,22 +30,26 @@ static WebPluginDatabase *database = nil;
 
 - (WebBasePluginPackage *)pluginForKey:(NSString *)key withEnumeratorSelector:(SEL)enumeratorSelector
 {
-    WebBasePluginPackage *plugin, *CFMPlugin=nil, *machoPlugin=nil;
+    WebBasePluginPackage *plugin, *CFMPlugin=nil, *machoPlugin=nil, *webPlugin=nil;
     uint i;
 
     for(i=0; i<[plugins count]; i++){
         plugin = [plugins objectAtIndex:i];
         if([[[plugin performSelector:enumeratorSelector] allObjects] containsObject:key]){
             if([plugin isKindOfClass:[WebPluginPackage class]]){
-                // It's the new kind of plug-in. Return it immediately.
-                return plugin;
+                if(webPlugin == nil){
+                    webPlugin = plugin;
+                }
             }else if([plugin isKindOfClass:[WebNetscapePluginPackage class]]){
                 WebExecutableType executableType = [(WebNetscapePluginPackage *)plugin executableType];
-
                 if(executableType == WebCFMExecutableType){
-                    CFMPlugin = plugin;
+                    if(CFMPlugin == nil){
+                        CFMPlugin = plugin;
+                    }
                 }else if(executableType == WebMachOExecutableType){
-                    machoPlugin = plugin;
+                    if(machoPlugin == nil){
+                        machoPlugin = plugin;
+                    }
                 }else{
                     [NSException raise:NSInternalInconsistencyException
                                 format:@"Unknown executable type for plugin"];
@@ -56,8 +60,10 @@ static WebPluginDatabase *database = nil;
             }
         }
     }
-
-    if(machoPlugin){
+    
+    if(webPlugin){
+        return webPlugin;
+    }else if(machoPlugin){
         return machoPlugin;
     }else{
         return CFMPlugin;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list