Changeset 25792 in webkit
- Timestamp:
- Sep 27, 2007 10:56:51 PM (17 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r25787 r25792 1 2007-09-27 John Sullivan <sullivan@apple.com> 2 3 Reviewed by Ollie 4 5 - fixed <rdar://problem/5408186> REGRESSION (5522-5523.9): Safari leaks every browser window 6 7 The leak started occurring when we removed the code to clear the delegates and the host window 8 from Safari as part of the fix for 5479443. But it turns out that Safari code was masking a 9 bug here in WebView: setHostWindow:nil needs to be called before setting _private->closed to 10 YES, or it will do nothing at all, causing a world leak due to a circular reference between 11 the window and the WebView. 12 13 I toyed with a more complex fix, but this is the simplest one that retains the fix for 5479443 14 while otherwise restoring the code order to be as close as possible to what it was before 15 5479443 was fixed. 16 17 * WebView/WebView.mm: 18 (-[WebView _close]): 19 Moved the call that sets _private->closed to YES to be after the code that clears the delegates 20 and the host window. Added a comment about this order. 21 1 22 2007-09-27 Kevin Decker <kdecker@apple.com> 2 23 -
trunk/WebKit/WebView/WebView.mm
r25718 r25792 680 680 if (!_private || _private->closed) 681 681 return; 682 _private->closed = YES;683 682 684 683 FrameLoader* mainFrameLoader = [[self mainFrame] _frameLoader]; … … 697 696 [self setScriptDebugDelegate:nil]; 698 697 [self setUIDelegate:nil]; 698 699 // setHostWindow:nil must be called before this value is set (see 5408186) 700 _private->closed = YES; 699 701 700 702 // To avoid leaks, call removeDragCaret in case it wasn't called after moveDragCaretToPoint.
Note: See TracChangeset
for help on using the changeset viewer.