Commit 872e16f0 authored by trey's avatar trey
Browse files

3137110 - REGRESSION: calls from 2nd and subsequent instances of Java 1.4.1...

	3137110 - REGRESSION: calls from 2nd and subsequent instances of Java 1.4.1 plug-in seem to be ignored

	We had previously made changes to "numb" a plugin controller after its frame
	was tossed or changed content.  We now finish the job by making sure a new
	controller is created when we go to a new page with plugins.  To so this we
	release the old controller whenever we flush the plugins from a page.

        Reviewed by Maciej.

        * WebView.subproj/WebFramePrivate.m:
        (-[WebFrame _detachFromParent]):  Call newly factored code.
        (-[WebFrame _transitionToCommitted:]):  Call newly factored code.
        (-[WebFrame _destroyPluginController]):  New method to tear down plugins.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3296b190
2002-12-30 Trey Matteson <trey@apple.com>
3137110 - REGRESSION: calls from 2nd and subsequent instances of Java 1.4.1 plug-in seem to be ignored
We had previously made changes to "numb" a plugin controller after its frame
was tossed or changed content. We now finish the job by making sure a new
controller is created when we go to a new page with plugins. To so this we
release the old controller whenever we flush the plugins from a page.
Reviewed by Maciej.
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _detachFromParent]): Call newly factored code.
(-[WebFrame _transitionToCommitted:]): Call newly factored code.
(-[WebFrame _destroyPluginController]): New method to tear down plugins.
2002-12-30 Trey Matteson <trey@apple.com>
3135025 - Assertion failure in _transitionToCommitted on espn nba scoreboard
......
......@@ -101,6 +101,8 @@ - (void)_scrollToTop;
- (WebHistoryItem *)_createItemTreeWithTargetFrame:(WebFrame *)targetFrame clippedAtTarget:(BOOL)doClip;
- (void)_resetBackForwardListToCurrent;
- (void)_destroyPluginController;
@end
@implementation WebFramePrivate
......@@ -337,7 +339,7 @@ - (void)_detachFromParent
_private->bridge = nil;
// Destroy plug-ins before blowing away the view.
[_private->pluginController destroyAllPlugins];
[self _destroyPluginController];
[self stopLoading];
[self _saveScrollPositionToItem:[_private currentItem]];
......@@ -507,7 +509,7 @@ - (void)_transitionToCommitted: (NSDictionary *)pageCache
ASSERT([self controller] != nil);
// Destroy plug-ins before blowing away the view.
[_private->pluginController destroyAllPlugins];
[self _destroyPluginController];
switch ([self _state]) {
case WebFrameStateProvisional:
......@@ -1616,6 +1618,18 @@ - (void)_addChild:(WebFrame *)child
[[child dataSource] _setOverrideEncoding:[[self dataSource] _overrideEncoding]];
}
- (void)_destroyPluginController
{
[_private->pluginController destroyAllPlugins];
// We flush this PluginController, so if a later page requests one we will make a new one
// instead of reusing the old one. Plugin views retain their PluginController, so a
// wayward view might try to message an old controller even after we call destroyAllPlugins.
// We don't want to have a controller that has to both ignore requests from stale views
// and honor those from current views, so it's easiest to make a new controller.
[_private->pluginController release];
_private->pluginController = nil;
}
- (WebPluginController *)_pluginController
{
if(!_private->pluginController){
......
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