Commit 3f454843 authored by andersca's avatar andersca

Reviewed by John Sullivan.

        http://bugs.webkit.org/show_bug.cgi?id=12308
        REGRESSION(r18910): Crash in WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError
        
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
        Move code from initWithFrame in here.



git-svn-id: svn://svn.chromium.org/blink/trunk@18992 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e45c27f7
2007-01-19 Anders Carlsson <acarlsson@apple.com>
Reviewed by John Sullivan.
http://bugs.webkit.org/show_bug.cgi?id=12308
REGRESSION(r18910): Crash in WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
Move code from initWithFrame in here.
2007-01-19 Anders Carlsson <acarlsson@apple.com>
Yet another build fix.
......
......@@ -147,42 +147,6 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
@implementation WebBaseNetscapePluginView
- (id)initWithFrame:(NSRect)frame
pluginPackage:(WebNetscapePluginPackage *)thePluginPackage
URL:(NSURL *)theURL
baseURL:(NSURL *)theBaseURL
MIMEType:(NSString *)MIME
attributeKeys:(NSArray *)keys
attributeValues:(NSArray *)values
loadManually:(BOOL)loadManually
DOMElement:(DOMElement *)anElement
{
[super initWithFrame:frame];
// load the plug-in if it is not already loaded
if (![thePluginPackage load]) {
[self release];
return nil;
}
[self setPluginPackage:thePluginPackage];
element = [anElement retain];
sourceURL = [theURL retain];
[self setMIMEType:MIME];
[self setBaseURL:theBaseURL];
[self setAttributeKeys:keys andValues:values];
if (loadManually)
[self setMode:NP_FULL];
else
[self setMode:NP_EMBED];
_loadManually = loadManually;
return self;
}
+ (void)initialize
{
WKSendUserChangeNotifications();
......@@ -1476,16 +1440,51 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
#pragma mark NSVIEW
- (NSView *)initWithFrame:(NSRect)frame
- (id)initWithFrame:(NSRect)frame
pluginPackage:(WebNetscapePluginPackage *)thePluginPackage
URL:(NSURL *)theURL
baseURL:(NSURL *)theBaseURL
MIMEType:(NSString *)MIME
attributeKeys:(NSArray *)keys
attributeValues:(NSArray *)values
loadManually:(BOOL)loadManually
DOMElement:(DOMElement *)anElement
{
[super initWithFrame:frame];
streams = [[NSMutableArray alloc] init];
pendingFrameLoads = [[NSMutableDictionary alloc] init];
pendingFrameLoads = [[NSMutableDictionary alloc] init];
// load the plug-in if it is not already loaded
if (![thePluginPackage load]) {
[self release];
return nil;
}
[self setPluginPackage:thePluginPackage];
element = [anElement retain];
sourceURL = [theURL retain];
[self setMIMEType:MIME];
[self setBaseURL:theBaseURL];
[self setAttributeKeys:keys andValues:values];
if (loadManually)
[self setMode:NP_FULL];
else
[self setMode:NP_EMBED];
_loadManually = loadManually;
return self;
}
- (id)initWithFrame:(NSRect)frame
{
ASSERT_NOT_REACHED();
return nil;
}
- (void)freeAttributeKeysAndValues
{
unsigned i;
......
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