Changeset 61509 in webkit
- Timestamp:
- Jun 20, 2010 1:27:58 PM (14 years ago)
- Location:
- trunk/WebKit/mac
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/mac/ChangeLog
r61464 r61509 1 2010-06-20 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 Change some WebPluginDabase ivars to use WebCore::String instead of NSString. 6 https://bugs.webkit.org/show_bug.cgi?id=40869 7 8 Re-land r61459, with extra null-checks in WebFrameLoaderClient. 9 10 * Plugins/Hosted/NetscapePluginHostManager.mm: 11 (WebKit::NetscapePluginHostManager::spawnPluginHost): 12 * Plugins/WebBasePluginPackage.h: 13 * Plugins/WebBasePluginPackage.mm: 14 (-[WebBasePluginPackage initWithPath:]): 15 (-[WebBasePluginPackage getPluginInfoFromPLists]): 16 (-[WebBasePluginPackage dealloc]): 17 (-[WebBasePluginPackage name]): 18 (-[WebBasePluginPackage path]): 19 (-[WebBasePluginPackage filename]): 20 (-[WebBasePluginPackage pluginDescription]): 21 (-[WebBasePluginPackage description]): 22 (-[WebBasePluginPackage isJavaPlugIn]): 23 * Plugins/WebNetscapePluginPackage.mm: 24 (-[WebNetscapePluginPackage getPluginInfoFromResources]): 25 (-[WebNetscapePluginPackage _tryLoad]): 26 (-[WebNetscapePluginPackage _unloadWithShutdown:]): 27 * Plugins/WebPluginPackage.mm: 28 (-[WebPluginPackage load]): 29 * WebCoreSupport/WebFrameLoaderClient.mm: 30 (WebFrameLoaderClient::createPlugin): 31 1 32 2010-06-18 Adam Barth <abarth@webkit.org> 2 33 -
trunk/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
r61464 r61509 157 157 NSDictionary *hostProperties = [[NSDictionary alloc] initWithObjectsAndKeys: 158 158 visibleName, @"visibleName", 159 [package path], @"bundlePath",159 (NSString *)[package path], @"bundlePath", 160 160 nil]; 161 161 -
trunk/WebKit/mac/Plugins/WebBasePluginPackage.h
r61464 r61509 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 29 #import <WebCore/PluginData.h> 28 30 29 31 #if ENABLE(NETSCAPE_PLUGIN_API) … … 55 57 NSMutableSet *pluginDatabases; 56 58 57 NSString *name;58 NSString *path;59 NSString *pluginDescription;59 WebCore::String name; 60 WebCore::String path; 61 WebCore::String pluginDescription; 60 62 61 63 NSBundle *bundle; … … 77 79 - (void)unload; 78 80 79 - ( NSString *)name;80 - ( NSString *)path;81 - ( NSString *)filename;82 - ( NSString *)pluginDescription;81 - (WebCore::String)filename; 82 - (const WebCore::String&)name; 83 - (const WebCore::String&)path; 84 - (const WebCore::String&)pluginDescription; 83 85 - (NSBundle *)bundle; 84 86 … … 92 94 - (NSArray *)extensionsForMIMEType:(NSString *)MIMEType; 93 95 94 - (void)setName:(NSString *)theName;95 - (void)setPath:(NSString *)thePath;96 - (void)setPluginDescription:(NSString *)description;97 96 - (void)setMIMEToDescriptionDictionary:(NSDictionary *)MIMEToDescriptionDictionary; 98 97 - (void)setMIMEToExtensionsDictionary:(NSDictionary *)MIMEToExtensionsDictionary; -
trunk/WebKit/mac/Plugins/WebBasePluginPackage.mm
r61464 r61509 48 48 #import <mach-o/loader.h> 49 49 50 51 50 #define JavaCocoaPluginIdentifier @"com.apple.JavaPluginCocoa" 52 51 #define JavaCarbonPluginIdentifier @"com.apple.JavaAppletPlugin" … … 59 58 - (NSArray *)_web_lowercaseStrings; 60 59 @end; 60 61 using namespace WebCore; 61 62 62 63 @implementation WebBasePluginPackage … … 123 124 return nil; 124 125 125 path = [pathByResolvingSymlinksAndAliases(pluginPath) copy];126 path = pathByResolvingSymlinksAndAliases(pluginPath); 126 127 bundle = [[NSBundle alloc] initWithPath:path]; 127 128 #ifndef __ppc__ … … 234 235 if (!theName) 235 236 theName = filename; 236 [self setName:theName];237 name = theName; 237 238 238 239 description = [bundle objectForInfoDictionaryKey:WebPluginDescriptionKey]; 239 240 if (!description) 240 241 description = filename; 241 [self setPluginDescription:description];242 pluginDescription = description; 242 243 243 244 return YES; … … 257 258 [pluginDatabases release]; 258 259 259 [name release];260 [path release];261 [pluginDescription release];262 263 260 [MIMEToDescription release]; 264 261 [MIMEToExtensions release]; … … 284 281 } 285 282 286 - ( NSString *)name283 - (const String&)name 287 284 { 288 285 return name; 289 286 } 290 287 291 - ( NSString *)path288 - (const String&)path 292 289 { 293 290 return path; 294 291 } 295 292 296 - ( NSString *)filename297 { 298 return [ path lastPathComponent];299 } 300 301 - ( NSString *)pluginDescription293 - (String)filename 294 { 295 return [(NSString *)path lastPathComponent]; 296 } 297 298 - (const String&)pluginDescription 302 299 { 303 300 return pluginDescription; … … 337 334 { 338 335 return bundle; 339 }340 341 - (void)setName:(NSString *)theName342 {343 [name release];344 name = [theName retain];345 }346 347 - (void)setPath:(NSString *)thePath348 {349 [path release];350 path = [thePath retain];351 }352 353 - (void)setPluginDescription:(NSString *)description354 {355 [pluginDescription release];356 pluginDescription = [description retain];357 336 } 358 337 … … 389 368 { 390 369 return [NSString stringWithFormat:@"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@", 391 name, path, [MIMEToExtensions description], [MIMEToDescription description],pluginDescription];370 (NSString *)name, (NSString *)path, [MIMEToExtensions description], [MIMEToDescription description], (NSString *)pluginDescription]; 392 371 } 393 372 … … 404 383 return [bundleIdentifier _webkit_isCaseInsensitiveEqualToString:JavaCocoaPluginIdentifier] || 405 384 [bundleIdentifier _webkit_isCaseInsensitiveEqualToString:JavaCarbonPluginIdentifier] || 406 [ [path lastPathComponent] _webkit_isCaseInsensitiveEqualToString:JavaCFMPluginFilename];385 [(NSString *)[self filename] _webkit_isCaseInsensitiveEqualToString:JavaCFMPluginFilename]; 407 386 } 408 387 -
trunk/WebKit/mac/Plugins/WebNetscapePluginPackage.mm
r61464 r61509 190 190 if (!description) 191 191 description = filename; 192 [self setPluginDescription:description];192 pluginDescription = description; 193 193 194 194 … … 196 196 if (!theName) 197 197 theName = filename; 198 [self setName:theName];198 name = theName; 199 199 200 200 [self closeResourceFile:resRef]; … … 353 353 CFAbsoluteTime duration; 354 354 #endif 355 LOG(Plugins, "%f Load timing started for: %@", start, [self name]);355 LOG(Plugins, "%f Load timing started for: %@", start, (NSString *)[self name]); 356 356 357 357 if (isLoaded) … … 626 626 627 627 if (pluginFuncs.javaClass) 628 LOG(LiveConnect, "%@: mach-o entry point for NPP_GetJavaClass = %p", [self name], pluginFuncs.javaClass);628 LOG(LiveConnect, "%@: mach-o entry point for NPP_GetJavaClass = %p", (NSString *)[self name], pluginFuncs.javaClass); 629 629 else 630 LOG(LiveConnect, "%@: no entry point for NPP_GetJavaClass", [self name]);630 LOG(LiveConnect, "%@: no entry point for NPP_GetJavaClass", (NSString *)[self name]); 631 631 632 632 #ifdef SUPPORT_CFM … … 737 737 return; 738 738 739 LOG(Plugins, "Unloading %@...", name);739 LOG(Plugins, "Unloading %@...", (NSString *)name); 740 740 741 741 // Cannot unload a plug-in package while an instance is still using it -
trunk/WebKit/mac/Plugins/WebPluginPackage.mm
r61464 r61509 95 95 #if !LOG_DISABLED 96 96 CFAbsoluteTime duration = CFAbsoluteTimeGetCurrent() - start; 97 LOG(Plugins, "principalClass took %f seconds for: %@", duration, [self name]);97 LOG(Plugins, "principalClass took %f seconds for: %@", duration, (NSString *)[self name]); 98 98 #endif 99 99 return [super load]; -
trunk/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r58878 r61509 1632 1632 if (!pluginPageURL.protocolInHTTPFamily()) 1633 1633 pluginPageURL = KURL(); 1634 NSString *pluginName = pluginPackage ? (NSString *)[pluginPackage name] : nil; 1635 1634 1636 NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode 1635 contentURL:pluginURL pluginPageURL:pluginPageURL pluginName: [pluginPackage name]MIMEType:MIMEType];1637 contentURL:pluginURL pluginPageURL:pluginPageURL pluginName:pluginName MIMEType:MIMEType]; 1636 1638 CallResourceLoadDelegate(implementations->plugInFailedWithErrorFunc, [m_webFrame.get() webView], 1637 1639 @selector(webView:plugInFailedWithError:dataSource:), error, [m_webFrame.get() _dataSource]); … … 1722 1724 WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(getWebView(m_webFrame.get())); 1723 1725 if (implementations->plugInFailedWithErrorFunc) { 1724 NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorJavaUnavailable contentURL:nil pluginPageURL:nil pluginName:[pluginPackage name] MIMEType:MIMEType]; 1726 NSString *pluginName = pluginPackage ? (NSString *)[pluginPackage name] : nil; 1727 NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorJavaUnavailable contentURL:nil pluginPageURL:nil pluginName:pluginName MIMEType:MIMEType]; 1725 1728 CallResourceLoadDelegate(implementations->plugInFailedWithErrorFunc, [m_webFrame.get() webView], 1726 1729 @selector(webView:plugInFailedWithError:dataSource:), error, [m_webFrame.get() _dataSource]);
Note: See TracChangeset
for help on using the changeset viewer.