[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:53:39 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0ea489c610f585d226c12c6ed82baca2aa0c7d9b
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 24 07:20:39 2002 +0000

    	- fixed a crash I ran into in the new delegate code
    
            * WebView.subproj/WebBaseResourceHandleDelegate.m:
            (-[WebBaseResourceHandleDelegate _releaseResources]): Retain self across this
    	deallocation to avoid reentering and being deallocated midstream. This happens
    	because the handle holds the only reference to us, and we may be releasing the
    	last reference to it.
            (-[WebBaseResourceHandleDelegate dealloc]): Add call to [super dealloc].
    
            * Plugins.subproj/WebBasePluginPackage.m: (-[WebBasePluginPackage dealloc]):
    	Add call to [super dealloc].
    
            * WebView.subproj/WebMainResourceClient.m: Tweak.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2445 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index f2d3dc4..7a5f32a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-10-24  Darin Adler  <darin at apple.com>
+
+	- fixed a crash I ran into in the new delegate code
+
+        * WebView.subproj/WebBaseResourceHandleDelegate.m:
+        (-[WebBaseResourceHandleDelegate _releaseResources]): Retain self across this
+	deallocation to avoid reentering and being deallocated midstream. This happens
+	because the handle holds the only reference to us, and we may be releasing the
+	last reference to it.
+        (-[WebBaseResourceHandleDelegate dealloc]): Add call to [super dealloc].
+
+        * Plugins.subproj/WebBasePluginPackage.m: (-[WebBasePluginPackage dealloc]):
+	Add call to [super dealloc].
+
+        * WebView.subproj/WebMainResourceClient.m: Tweak.
+
 2002-10-23  Darin Adler  <darin at apple.com>
 
 	- fixed 3083013 -- REGRESSION: Cookie refused at http://directory/ even on reload
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index f2d3dc4..7a5f32a 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-10-24  Darin Adler  <darin at apple.com>
+
+	- fixed a crash I ran into in the new delegate code
+
+        * WebView.subproj/WebBaseResourceHandleDelegate.m:
+        (-[WebBaseResourceHandleDelegate _releaseResources]): Retain self across this
+	deallocation to avoid reentering and being deallocated midstream. This happens
+	because the handle holds the only reference to us, and we may be releasing the
+	last reference to it.
+        (-[WebBaseResourceHandleDelegate dealloc]): Add call to [super dealloc].
+
+        * Plugins.subproj/WebBasePluginPackage.m: (-[WebBasePluginPackage dealloc]):
+	Add call to [super dealloc].
+
+        * WebView.subproj/WebMainResourceClient.m: Tweak.
+
 2002-10-23  Darin Adler  <darin at apple.com>
 
 	- fixed 3083013 -- REGRESSION: Cookie refused at http://directory/ even on reload
diff --git a/WebKit/Plugins.subproj/WebBasePluginPackage.m b/WebKit/Plugins.subproj/WebBasePluginPackage.m
index e0ce7b9..ea9bbb2 100644
--- a/WebKit/Plugins.subproj/WebBasePluginPackage.m
+++ b/WebKit/Plugins.subproj/WebBasePluginPackage.m
@@ -48,8 +48,9 @@
 
     [MIMEToDescription release];
     [MIMEToExtensions release];
-    [extensionToMIME removeAllObjects];
     [extensionToMIME release];
+    
+    [super dealloc];
 }
 
 
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index eba1578..789796a 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -3,6 +3,8 @@
     Copyright (c) 2002, Apple Computer, Inc. All rights reserved.
 */
 
+#import <WebKit/WebBaseResourceHandleDelegate.h>
+
 #import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebError.h>
 #import <WebFoundation/WebHTTPResourceRequest.h>
@@ -10,13 +12,11 @@
 #import <WebFoundation/WebResourceRequest.h>
 #import <WebFoundation/WebResourceResponse.h>
 
-#import <WebKit/WebBaseResourceHandleDelegate.h>
 #import <WebKit/WebController.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebStandardPanelsPrivate.h>
 
-
 @implementation WebBaseResourceHandleDelegate
 
 - init
@@ -30,6 +30,13 @@
 
 - (void)_releaseResources
 {
+    // It's possible that when we release the handle, it will be
+    // deallocated and release the last reference to this object.
+    // We need to retain to avoid accessing the object after it
+    // has been deallocated and also to avoid reentering this method.
+    
+    [self retain];
+    
     [identifier release];
     identifier = nil;
 
@@ -46,6 +53,8 @@
     downloadDelegate = nil;
     
     reachedTerminalState = YES;
+    
+    [self release];
 }
 
 - (void)dealloc
@@ -54,6 +63,7 @@
     [request release];
     [response release];
     [currentURL release];
+    [super dealloc];
 }
 
 - (void)setDataSource: (WebDataSource *)d
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index eba1578..789796a 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -3,6 +3,8 @@
     Copyright (c) 2002, Apple Computer, Inc. All rights reserved.
 */
 
+#import <WebKit/WebBaseResourceHandleDelegate.h>
+
 #import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebError.h>
 #import <WebFoundation/WebHTTPResourceRequest.h>
@@ -10,13 +12,11 @@
 #import <WebFoundation/WebResourceRequest.h>
 #import <WebFoundation/WebResourceResponse.h>
 
-#import <WebKit/WebBaseResourceHandleDelegate.h>
 #import <WebKit/WebController.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebStandardPanelsPrivate.h>
 
-
 @implementation WebBaseResourceHandleDelegate
 
 - init
@@ -30,6 +30,13 @@
 
 - (void)_releaseResources
 {
+    // It's possible that when we release the handle, it will be
+    // deallocated and release the last reference to this object.
+    // We need to retain to avoid accessing the object after it
+    // has been deallocated and also to avoid reentering this method.
+    
+    [self retain];
+    
     [identifier release];
     identifier = nil;
 
@@ -46,6 +53,8 @@
     downloadDelegate = nil;
     
     reachedTerminalState = YES;
+    
+    [self release];
 }
 
 - (void)dealloc
@@ -54,6 +63,7 @@
     [request release];
     [response release];
     [currentURL release];
+    [super dealloc];
 }
 
 - (void)setDataSource: (WebDataSource *)d
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 5330397..0a84a1e 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -3,6 +3,17 @@
     Copyright (c) 2001, 2002, Apple Computer, Inc. All rights reserved.
 */
 
+#import <WebKit/WebMainResourceClient.h>
+
+#import <WebFoundation/WebCookieConstants.h>
+#import <WebFoundation/WebError.h>
+#import <WebFoundation/WebFileTypeMappings.h>
+#import <WebFoundation/WebResourceHandle.h>
+#import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebHTTPResourceRequest.h>
+#import <WebFoundation/WebResourceHandlePrivate.h>
+#import <WebFoundation/WebResourceResponse.h>
+
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebController.h>
 #import <WebKit/WebControllerPrivate.h>
@@ -15,20 +26,10 @@
 #import <WebKit/WebKitErrors.h>
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebLocationChangeDelegate.h>
-#import <WebKit/WebMainResourceClient.h>
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebStandardPanelsPrivate.h>
 #import <WebKit/WebView.h>
 
-#import <WebFoundation/WebError.h>
-#import <WebFoundation/WebFileTypeMappings.h>
-#import <WebFoundation/WebResourceHandle.h>
-#import <WebFoundation/WebResourceRequest.h>
-#import <WebFoundation/WebHTTPResourceRequest.h>
-#import <WebFoundation/WebResourceHandlePrivate.h>
-#import <WebFoundation/WebResourceResponse.h>
-#import <WebFoundation/WebCookieConstants.h>
-
 // FIXME: This is quite similar to WebSubresourceClient; they should share code.
 
 @implementation WebMainResourceClient
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 5330397..0a84a1e 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -3,6 +3,17 @@
     Copyright (c) 2001, 2002, Apple Computer, Inc. All rights reserved.
 */
 
+#import <WebKit/WebMainResourceClient.h>
+
+#import <WebFoundation/WebCookieConstants.h>
+#import <WebFoundation/WebError.h>
+#import <WebFoundation/WebFileTypeMappings.h>
+#import <WebFoundation/WebResourceHandle.h>
+#import <WebFoundation/WebResourceRequest.h>
+#import <WebFoundation/WebHTTPResourceRequest.h>
+#import <WebFoundation/WebResourceHandlePrivate.h>
+#import <WebFoundation/WebResourceResponse.h>
+
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebController.h>
 #import <WebKit/WebControllerPrivate.h>
@@ -15,20 +26,10 @@
 #import <WebKit/WebKitErrors.h>
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebLocationChangeDelegate.h>
-#import <WebKit/WebMainResourceClient.h>
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebStandardPanelsPrivate.h>
 #import <WebKit/WebView.h>
 
-#import <WebFoundation/WebError.h>
-#import <WebFoundation/WebFileTypeMappings.h>
-#import <WebFoundation/WebResourceHandle.h>
-#import <WebFoundation/WebResourceRequest.h>
-#import <WebFoundation/WebHTTPResourceRequest.h>
-#import <WebFoundation/WebResourceHandlePrivate.h>
-#import <WebFoundation/WebResourceResponse.h>
-#import <WebFoundation/WebCookieConstants.h>
-
 // FIXME: This is quite similar to WebSubresourceClient; they should share code.
 
 @implementation WebMainResourceClient

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list