- 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
+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.
NSString *pluginDescription;
NSBundle *bundle;
+ CFBundleRef cfBundle;
NSDate *lastModifiedDate;
#import <WebKit/WebNSObjectExtras.h>
#import <WebKit/WebPluginPackage.h>
-#import <Foundation/NSPrivateDecls.h>
-
#import <CoreFoundation/CFBundlePriv.h>
#define JavaCocoaPluginIdentifier @"com.apple.JavaPluginCocoa"
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];
#import <JavaScriptCore/npruntime_impl.h>
-#import <Foundation/NSPrivateDecls.h>
-
typedef void (* FunctionPointer) (void);
typedef void (* TransitionVector) (void);
static FunctionPointer functionPointerForTVector(TransitionVector);
OSErr err;
if (isBundle) {
- return CFBundleOpenBundleResourceMap([bundle _cfBundle]);
+ return CFBundleOpenBundleResourceMap(cfBundle);
} else {
err = FSPathMakeRef((const UInt8 *)[path fileSystemRepresentation], &fref, NULL);
if (err != noErr) {
- (void)closeResourceFile:(SInt16)resRef
{
if (isBundle) {
- CFBundleCloseBundleResourceMap([bundle _cfBundle], resRef);
+ CFBundleCloseBundleResourceMap(cfBundle, resRef);
} else {
CloseResFile(resRef);
}
// Bundle
if (bundle) {
isBundle = YES;
- CFBundleGetPackageInfo([bundle _cfBundle], &type, NULL);
+ CFBundleGetPackageInfo(cfBundle, &type, NULL);
}
#ifdef __ppc__
// Single-file plug-in with resource fork
}
if (isBundle) {
- CFBundleUnloadExecutable([bundle _cfBundle]);
+ CFBundleUnloadExecutable(cfBundle);
} else {
CloseConnection(&connID);
}
}
if (isBundle) {
- CFBundleRef cfBundle = [bundle _cfBundle];
if (!CFBundleLoadExecutable(cfBundle)) {
goto abort;
}
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebKitNSStringExtras.h>
-#import <Foundation/NSPrivateDecls.h>
-
NSString *WebPlugInBaseURLKey = @"WebPlugInBaseURLKey";
NSString *WebPlugInAttributesKey = @"WebPlugInAttributesKey";
NSString *WebPlugInContainerKey = @"WebPlugInContainerKey";
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;