Reviewed by Darin.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Mar 2006 22:39:42 +0000 (22:39 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Mar 2006 22:39:42 +0000 (22:39 +0000)
        We need to set reachedTerminalState to YES before we release
        the resources to prevent a double dealloc of WebView

        Fixes <rdar://problem/4372628> crash deallocating a WebView in -[WebFrame stopLoading]

        * WebView/WebLoader.m:
        (-[NSURLProtocol releaseResources]): set reachedTerminalState earlier

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13620 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebView/WebLoader.m

index a8187a7e3a077ecba6ebabcb8a9b53719ff3894a..d7a58da231464444da90bf80e3443fa963461ad3 100644 (file)
@@ -1,3 +1,15 @@
+2006-03-31  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Darin.
+
+        We need to set reachedTerminalState to YES before we release
+        the resources to prevent a double dealloc of WebView
+
+        Fixes <rdar://problem/4372628> crash deallocating a WebView in -[WebFrame stopLoading]
+
+        * WebView/WebLoader.m:
+        (-[NSURLProtocol releaseResources]): set reachedTerminalState earlier
+
 2006-03-31  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Tim Omernick.
index 0dc30c5c2d83e6f615a8faeed6314a79e1f9bb9c..f4c0077fba40d39bc392117d4f7f0fb2426b3a3e 100644 (file)
@@ -124,7 +124,12 @@ static BOOL NSURLConnectionSupportsBufferedData;
     // has been deallocated and also to avoid reentering this method.
     
     [self retain];
-    
+
+    // We need to set reachedTerminalState to YES before we release
+    // the resources to prevent a double dealloc of WebView <rdar://problem/4372628>
+
+    reachedTerminalState = YES;
+
     [identifier release];
     identifier = nil;
 
@@ -148,9 +153,7 @@ static BOOL NSURLConnectionSupportsBufferedData;
     
     [resourceData release];
     resourceData = nil;
-    
-    reachedTerminalState = YES;
-    
+
     [self release];
 }