[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 07:45:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit a6d3501f00327aeaf197b6b6a0c3ea4d305af31a
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jun 11 17:37:55 2003 +0000

            Reviewed by John.
    
    	- fixed 3285808 -- repro world leak when replacing div that contains iframe (at www.kbs.co.kr)
    
            * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge frameDetached]):
            Add a call to _detachFromParent.
            * WebView.subproj/WebFramePrivate.m: (-[WebFrame _removeChild:]):
            Nil out the parent pointer in the removed child.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4522 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b79d471..9041851 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2003-06-11  Darin Adler  <darin at apple.com>
+
+        Reviewed by John.
+
+	- fixed 3285808 -- repro world leak when replacing div that contains iframe (at www.kbs.co.kr)
+
+        * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge frameDetached]):
+        Add a call to _detachFromParent.
+        * WebView.subproj/WebFramePrivate.m: (-[WebFrame _removeChild:]):
+        Nil out the parent pointer in the removed child.
+
 2003-06-10  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3288076>: REGRESSION: Fragment scroll stops page load
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index d88ccbc..a0b9b8b 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -929,8 +929,13 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
 
 - (void)frameDetached
 {
-    [_frame stopLoading];
-    [[_frame parentFrame] _removeChild:_frame];
+    // Put _frame into a local variable because _detachFromParent
+    // will disconnect the bridge from the frame and make _frame nil.
+    WebFrame *frame = _frame;
+
+    [frame stopLoading];
+    [frame _detachFromParent];
+    [[frame parentFrame] _removeChild:frame];
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 44a3ebb..be4b74f 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -1938,7 +1938,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
 - (void)_removeChild:(WebFrame *)child
 {
-    [_private->children removeObject: child];
+    [_private->children removeObject:child];
+    child->_private->parent = nil;
 }
 
 - (void)_addFramePathToString:(NSMutableString *)path

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list