Commit 1d23cad5 authored by andersca's avatar andersca
Browse files

Reviewed by Geoff.

        Call cleanupScriptObjectsForPlugin on the frame after destroying the plug-in.
        
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView _destroyPlugin]):
        * Plugins/WebPluginController.mm:
        (-[WebPluginController destroyPlugin:]):
        (-[WebPluginController destroyAllPlugins]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 74e7f3d5
2007-06-14 Anders Carlsson <andersca@apple.com>
Reviewed by Geoff.
Call cleanupScriptObjectsForPlugin on the frame after destroying the plug-in.
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView _destroyPlugin]):
* Plugins/WebPluginController.mm:
(-[WebPluginController destroyPlugin:]):
(-[WebPluginController destroyAllPlugins]):
2007-06-13 John Sullivan <sullivan@apple.com>
 
Reviewed by Adele Peterson
......
......@@ -2640,6 +2640,10 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
NPError npErr;
npErr = NPP_Destroy(plugin, NULL);
LOG(Plugins, "NPP_Destroy: %d", npErr);
if (Frame* frame = core([self webFrame]))
frame->cleanupScriptObjectsForPlugin(self);
free(plugin);
plugin = NULL;
}
......
......@@ -30,6 +30,7 @@
#import <WebKit/WebPluginController.h>
#import <Foundation/NSURLRequest.h>
#import <WebCore/Frame.h>
#import <WebCore/FrameLoader.h>
#import <WebCore/ResourceRequest.h>
#import <WebCore/PlatformString.h>
......@@ -53,6 +54,8 @@
#import <WebKit/WebUIDelegate.h>
#import <WebKit/WebViewInternal.h>
using namespace WebCore;
@interface NSView (PluginSecrets)
- (void)setContainingWindow:(NSWindow *)w;
@end
......@@ -229,6 +232,9 @@ static NSMutableSet *pluginViews = nil;
[view pluginDestroy];
}
if (Frame* frame = core([self webFrame]))
frame->cleanupScriptObjectsForPlugin(view);
[pluginViews removeObject:view];
[_views removeObject:view];
}
......@@ -267,6 +273,7 @@ static void cancelOutstandingCheck(const void *item, void *context)
int i, count = [_views count];
for (i = 0; i < count; i++) {
id aView = [_views objectAtIndex:i];
if ([aView respondsToSelector:@selector(webPlugInDestroy)]) {
KJS::JSLock::DropAllLocks dropAllLocks;
[aView webPlugInDestroy];
......@@ -274,6 +281,10 @@ static void cancelOutstandingCheck(const void *item, void *context)
KJS::JSLock::DropAllLocks dropAllLocks;
[aView pluginDestroy];
}
if (Frame* frame = core([self webFrame]))
frame->cleanupScriptObjectsForPlugin(aView);
[pluginViews removeObject:aView];
// Remove the containing view.
......
......@@ -1324,6 +1324,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
knownRegions = (
English,
......
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