Commit 75da3937 authored by kdecker@apple.com's avatar kdecker@apple.com

Reviewed by Anders.

        <rdar://problem/5412759> CrashTracer: [USER] 22 crashes in Safari at com.apple.quicktime.webplugin: NPN_SetValue + 15403
        
        In certain situations, code in WebBasePluginPackage would load a plug-in only for the explicit reason of asking it to create a
        preference file, but wouldn't actually unload the bundle. This created problems for the QuickTime WebKit plug-in by unloading
        a bundle out from underneath itself.

        * Plugins/WebBasePluginPackage.h: Added unload method.
        * Plugins/WebBasePluginPackage.m:
        (-[WebBasePluginPackage unload]): Added new method. Currently, only Netscape plug-ins support unload.
        (-[WebBasePluginPackage pListForPath:createFile:]): Added a call to unload.
        * Plugins/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage unload]): Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4b8396c1
2008-04-15 Kevin Decker <kdecker@apple.com>
Reviewed by Anders.
<rdar://problem/5412759> CrashTracer: [USER] 22 crashes in Safari at com.apple.quicktime.webplugin: NPN_SetValue + 15403
In certain situations, code in WebBasePluginPackage would load a plug-in only for the explicit reason of asking it to create a
preference file, but wouldn't actually unload the bundle. This created problems for the QuickTime WebKit plug-in by unloading
a bundle out from underneath itself.
* Plugins/WebBasePluginPackage.h: Added unload method.
* Plugins/WebBasePluginPackage.m:
(-[WebBasePluginPackage unload]): Added new method. Currently, only Netscape plug-ins support unload.
(-[WebBasePluginPackage pListForPath:createFile:]): Added a call to unload.
* Plugins/WebNetscapePluginPackage.m:
(-[WebNetscapePluginPackage unload]): Added.
2008-04-15 Anders Carlsson <andersca@apple.com>
Reviewed by Adam.
......
......@@ -76,6 +76,7 @@ typedef void (*BP_CreatePluginMIMETypesPreferencesFuncPtr)(void);
- (BOOL)getPluginInfoFromPLists;
- (BOOL)load;
- (void)unload;
- (NSString *)name;
- (NSString *)path;
......
......@@ -189,10 +189,16 @@ - (BOOL)getPluginInfoFromBundleAndMIMEDictionary:(NSDictionary *)MIMETypes
return YES;
}
- (void)unload
{
}
- (NSDictionary *)pListForPath:(NSString *)pListPath createFile:(BOOL)createFile
{
if (createFile && [self load] && BP_CreatePluginMIMETypesPreferences)
if (createFile && [self load] && BP_CreatePluginMIMETypesPreferences) {
BP_CreatePluginMIMETypesPreferences();
[self unload];
}
NSDictionary *pList = nil;
NSData *data = [NSData dataWithContentsOfFile:pListPath];
......
......@@ -299,6 +299,11 @@ - (void)_applyDjVuWorkaround
}
- (void)unload
{
[self _unloadWithShutdown:YES];
}
- (BOOL)load
{
NP_GetEntryPointsFuncPtr NP_GetEntryPoints = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment