Reviewed by Mark.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2007 08:43:19 +0000 (08:43 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2007 08:43:19 +0000 (08:43 +0000)
        <rdar://problem/5154113> Repro ASSERT (would be crash) in KJS::GCLock::GCLock (13462)
        http://bugs.webkit.org/show_bug.cgi?id=13462

        * WebInspector/WebInspector.m:
        (-[WebInspectorPrivate dealloc]): Delay release of WebView to avoid GC re-entrancy.

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

WebKit/ChangeLog
WebKit/WebInspector/WebInspector.m

index 1e2d371..b4027cb 100644 (file)
@@ -1,3 +1,13 @@
+2007-04-27  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Mark.
+        
+        <rdar://problem/5154113> Repro ASSERT (would be crash) in KJS::GCLock::GCLock (13462)
+        http://bugs.webkit.org/show_bug.cgi?id=13462
+
+        * WebInspector/WebInspector.m:
+        (-[WebInspectorPrivate dealloc]): Delay release of WebView to avoid GC re-entrancy.
+
 2007-04-27  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Mitz.
index 63cadc4..ea3a747 100644 (file)
@@ -512,7 +512,11 @@ static WebInspector *sharedWebInspector = nil;
 @implementation WebInspectorPrivate
 - (void)dealloc
 {
-    [webView release];
+    // Releasing our WebView will trigger a garbage collection, but this dealloc is
+    // likely going to happen inside GC and we don't want to re-enter the collector.
+    // Just autorelease is not good enough, because the ObjC bindings code drains the
+    // autorelease pool.
+    [webView performSelector:@selector(release) withObject:nil afterDelay:0];
     [inspectedWebFrame release];
     [currentHighlight release];
 #ifndef NDEBUG