Reviewed by Vicki.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2005 04:46:40 +0000 (04:46 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2005 04:46:40 +0000 (04:46 +0000)
- remove use of _cfBundle SPI

        * Plugins.subproj/WebBasePluginPackage.h:
        * Plugins.subproj/WebBasePluginPackage.m:
        (-[WebBasePluginPackage initWithPath:]):
        (-[WebBasePluginPackage load]):
        (-[WebBasePluginPackage dealloc]):
        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage openResourceFile]):
        (-[WebNetscapePluginPackage closeResourceFile:]):
        (-[WebNetscapePluginPackage initWithPath:]):
        (-[WebNetscapePluginPackage unloadWithoutShutdown]):
        (-[WebNetscapePluginPackage load]):
        * Plugins.subproj/WebPluginPackage.m:
        (-[WebPluginPackage initWithPath:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/Plugins.subproj/WebBasePluginPackage.h
WebKit/Plugins.subproj/WebBasePluginPackage.m
WebKit/Plugins.subproj/WebNetscapePluginPackage.m
WebKit/Plugins.subproj/WebPluginPackage.m

index 7012acca1ba847a9a1db139aba8a19f750146ce1..48cb9643f75ea96faa96b71786081319336f01bc 100644 (file)
@@ -1,3 +1,23 @@
+2005-06-02  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Vicki.
+
+       - remove use of _cfBundle SPI
+
+        * Plugins.subproj/WebBasePluginPackage.h:
+        * Plugins.subproj/WebBasePluginPackage.m:
+        (-[WebBasePluginPackage initWithPath:]):
+        (-[WebBasePluginPackage load]):
+        (-[WebBasePluginPackage dealloc]):
+        * Plugins.subproj/WebNetscapePluginPackage.m:
+        (-[WebNetscapePluginPackage openResourceFile]):
+        (-[WebNetscapePluginPackage closeResourceFile:]):
+        (-[WebNetscapePluginPackage initWithPath:]):
+        (-[WebNetscapePluginPackage unloadWithoutShutdown]):
+        (-[WebNetscapePluginPackage load]):
+        * Plugins.subproj/WebPluginPackage.m:
+        (-[WebPluginPackage initWithPath:]):
+
 2005-06-02  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Adele.
index 0b92dc6f3e0b4d086570a22462cad371ca0589e5..e9627bc244452e092a50ff6dcf83cb0d89263bb9 100644 (file)
@@ -27,6 +27,7 @@
     NSString *pluginDescription;
 
     NSBundle *bundle;
+       CFBundleRef cfBundle;
     
     NSDate *lastModifiedDate;
 
index f1cada866de2fdf3ca6959f5820b7be06d7a5b09..c9712af129630706a269254ffdce78141cc0ee62 100644 (file)
@@ -13,8 +13,6 @@
 #import <WebKit/WebNSObjectExtras.h>
 #import <WebKit/WebPluginPackage.h>
 
-#import <Foundation/NSPrivateDecls.h>
-
 #import <CoreFoundation/CFBundlePriv.h>
 
 #define JavaCocoaPluginIdentifier      @"com.apple.JavaPluginCocoa"
@@ -86,6 +84,7 @@
     extensionToMIME = [[NSMutableDictionary alloc] init];
     path = [[self pathByResolvingSymlinksAndAliasesInPath:pluginPath] retain];
     bundle = [[NSBundle alloc] initWithPath:path];
+       cfBundle = CFBundleCreate(NULL, (CFURLRef)[NSURL fileURLWithPath:path]);
     lastModifiedDate = [[[[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:YES] objectForKey:NSFileModificationDate] retain];
     return self;
 }
 - (BOOL)load
 {
     if (isLoaded && bundle != nil && BP_CreatePluginMIMETypesPreferences == NULL) {
-        BP_CreatePluginMIMETypesPreferences = (BP_CreatePluginMIMETypesPreferencesFuncPtr)CFBundleGetFunctionPointerForName([bundle _cfBundle], CFSTR("BP_CreatePluginMIMETypesPreferences"));
+        BP_CreatePluginMIMETypesPreferences = (BP_CreatePluginMIMETypesPreferencesFuncPtr)CFBundleGetFunctionPointerForName(cfBundle, CFSTR("BP_CreatePluginMIMETypesPreferences"));
     }
     return isLoaded;
 }
     [extensionToMIME release];
 
     [bundle release];
+       CFRelease(cfBundle);
 
     [lastModifiedDate release];
     
index 2f478239caf0901c883809ba1efa4978bcb4aa29..06a07dceeb04d9db3f3cbda15c9aa1eed51d1992 100644 (file)
@@ -11,8 +11,6 @@
 
 #import <JavaScriptCore/npruntime_impl.h>
 
-#import <Foundation/NSPrivateDecls.h>
-
 typedef void (* FunctionPointer) (void);
 typedef void (* TransitionVector) (void);
 static FunctionPointer functionPointerForTVector(TransitionVector);
@@ -49,7 +47,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
     OSErr err;
     
     if (isBundle) {
-        return CFBundleOpenBundleResourceMap([bundle _cfBundle]);
+        return CFBundleOpenBundleResourceMap(cfBundle);
     } else {
         err = FSPathMakeRef((const UInt8 *)[path fileSystemRepresentation], &fref, NULL);
         if (err != noErr) {
@@ -63,7 +61,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
 - (void)closeResourceFile:(SInt16)resRef
 {
     if (isBundle) {
-        CFBundleCloseBundleResourceMap([bundle _cfBundle], resRef);
+        CFBundleCloseBundleResourceMap(cfBundle, resRef);
     } else {
         CloseResFile(resRef);
     }
@@ -181,7 +179,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
     // Bundle
     if (bundle) {
         isBundle = YES;
-        CFBundleGetPackageInfo([bundle _cfBundle], &type, NULL);
+        CFBundleGetPackageInfo(cfBundle, &type, NULL);
     }
 #ifdef __ppc__
     // Single-file plug-in with resource fork
@@ -250,7 +248,7 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
     }
 
     if (isBundle) {
-        CFBundleUnloadExecutable([bundle _cfBundle]);
+        CFBundleUnloadExecutable(cfBundle);
     } else {
         CloseConnection(&connID);
     }
@@ -292,7 +290,6 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
     }
     
     if (isBundle) {
-        CFBundleRef cfBundle = [bundle _cfBundle];
         if (!CFBundleLoadExecutable(cfBundle)) {
             goto abort;
         }
index 331ff94fdd46929e78f4e8d249e915da83c4cc4b..616b9f12ee213eb4a437cb9045b1ecadaaea4cb4 100644 (file)
@@ -11,8 +11,6 @@
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebKitNSStringExtras.h>
 
-#import <Foundation/NSPrivateDecls.h>
-
 NSString *WebPlugInBaseURLKey =     @"WebPlugInBaseURLKey";
 NSString *WebPlugInAttributesKey =  @"WebPlugInAttributesKey";
 NSString *WebPlugInContainerKey =   @"WebPlugInContainerKey";
@@ -37,7 +35,7 @@ extern NSString *WebPlugInContainingElementKey;
     
     if (![[pluginPath pathExtension] _webkit_isCaseInsensitiveEqualToString:@"webplugin"]) {
         UInt32 type = 0;
-        CFBundleGetPackageInfo([bundle _cfBundle], &type, NULL);
+        CFBundleGetPackageInfo(cfBundle, &type, NULL);
         if (type != FOUR_CHAR_CODE('WBPL')) {
             [self release];
             return nil;