Reviewed by John Sullivan.
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jan 2007 23:18:20 +0000 (23:18 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Jan 2007 23:18:20 +0000 (23:18 +0000)
        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: https://svn.webkit.org/repository/webkit/trunk@18992 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/Plugins/WebBaseNetscapePluginView.mm

index b765c79..08613be 100644 (file)
@@ -1,5 +1,16 @@
 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.
         
         * WebCoreSupport/WebChromeClient.h:
index 5605245..9f821f3 100644 (file)
@@ -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;