Commit b3cf3672 authored by darin's avatar darin
Browse files

Fix dataSource-related plugin crash.

        * Plugins.subproj/WebPluginView.m:
        (-[WebNetscapePluginView start]): Don't grab dataSource here.
	It's too early.
        (-[WebNetscapePluginView setDataSource:]): Grab it here.

        * Plugins.subproj/WebPluginStream.h:
        * Plugins.subproj/WebPluginStream.m:
	Simplified includes and added asserts while debugging.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1c1e782d
2002-09-13 Darin Adler <darin@apple.com>
Fix dataSource-related plugin crash.
* Plugins.subproj/WebPluginView.m:
(-[WebNetscapePluginView start]): Don't grab dataSource here.
It's too early.
(-[WebNetscapePluginView setDataSource:]): Grab it here.
* Plugins.subproj/WebPluginStream.h:
* Plugins.subproj/WebPluginStream.m:
Simplified includes and added asserts while debugging.
2002-09-13 Richard Williamson (Home) <rjw@apple.com>
Changed drag hysteresis to 5 and disallow selection initiation within
......
2002-09-13 Darin Adler <darin@apple.com>
Fix dataSource-related plugin crash.
* Plugins.subproj/WebPluginView.m:
(-[WebNetscapePluginView start]): Don't grab dataSource here.
It's too early.
(-[WebNetscapePluginView setDataSource:]): Grab it here.
* Plugins.subproj/WebPluginStream.h:
* Plugins.subproj/WebPluginStream.m:
Simplified includes and added asserts while debugging.
2002-09-13 Richard Williamson (Home) <rjw@apple.com>
Changed drag hysteresis to 5 and disallow selection initiation within
......
......@@ -4,12 +4,13 @@
*/
#import <Foundation/Foundation.h>
#import <WebFoundation/WebFoundation.h>
#import <WebKit/WebKit.h>
#import <WebKit/WebPluginView.h>
#import <WebKit/npapi.h>
@class WebDataSource;
@class WebResourceHandle;
@class WebNetscapePluginView;
@protocol WebDocumentRepresentation;
@interface WebNetscapePluginStream : NSObject <WebDocumentRepresentation>
......@@ -42,4 +43,5 @@
- (void)startLoad;
- (void)stop;
@end
......@@ -3,9 +3,10 @@
Copyright (c) 2002, Apple, Inc. All rights reserved.
*/
#import <WebKit/npapi.h>
#import <WebKit/WebLoadProgress.h>
#import <WebKit/WebPluginStream.h>
#import <WebKit/WebPluginView.h>
#import <WebKit/WebLoadProgress.h>
#import <WebKit/WebView.h>
#import <WebKit/WebDataSource.h>
#import <WebKit/WebDataSourcePrivate.h>
......@@ -13,7 +14,9 @@
#import <WebKit/WebKitLogging.h>
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebError.h>
#import <WebFoundation/WebNSFileManagerExtras.h>
#import <WebFoundation/WebResourceHandle.h>
#import <WebFoundation/WebResourceRequest.h>
#import <WebFoundation/WebResourceResponse.h>
......@@ -93,6 +96,7 @@ - (void) dealloc
- (void)startLoad
{
ASSERT([view webDataSource]);
WebResourceRequest *request = [[WebResourceRequest alloc] initWithURL:URL];
resource = [[WebResourceHandle alloc] initWithRequest:request client:self];
[resource loadInBackground];
......
......@@ -577,7 +577,6 @@ -(void)start
WebView *webView = (WebView *)[self _web_superviewOfClass:[WebView class]];
webController = [[webView controller] retain];
webFrame = [[webController frameForView:webView] retain];
webDataSource = [[webFrame dataSource] retain];
if(srcURL){
stream = [[WebNetscapePluginStream alloc] initWithURL:srcURL pluginPointer:instance];
......@@ -657,6 +656,9 @@ - (void)setDataSource:(WebDataSource *)dataSource
{
WebNetscapePlugin *plugin;
[webDataSource release];
webDataSource = [dataSource retain];
mime = [[dataSource contentType] retain];
plugin = [[WebNetscapePluginDatabase installedPlugins] pluginForMimeType:mime];
......
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