Changeset 175733 in webkit
- Timestamp:
- Nov 6, 2014 6:11:16 PM (9 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r175719 r175733 1 2014-11-06 Daniel Jalkut <jalkut@red-sweater.com> 2 3 Wrap the bulk of -[WebView dealloc] with an autorelease pool. 4 https://bugs.webkit.org/show_bug.cgi?id=138443 5 6 Reviewed by Anders Carlsson. 7 8 Wrapping the dealloc method in its own autorelease pool avoids the problem of 9 complex tear-downs leading to the WebView itself being added to an autorelease 10 pool that is not drained until after the instance has been dealloc'd. 11 12 * WebView/WebView.mm: 13 (-[WebView dealloc]): 14 1 15 2014-11-05 Jer Noble <jer.noble@apple.com> 2 16 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r175583 r175733 5086 5086 return; 5087 5087 5088 #if PLATFORM(IOS) 5089 if (_private) 5090 [_private->_geolocationProvider stopTrackingWebView:self]; 5091 #endif 5092 5093 // call close to ensure we tear-down completely 5094 // this maintains our old behavior for existing applications 5095 [self close]; 5096 5097 if ([[self class] shouldIncludeInWebKitStatistics]) 5098 --WebViewCount; 5099 5100 #if !PLATFORM(IOS) 5101 if ([self _needsFrameLoadDelegateRetainQuirk]) 5102 [_private->frameLoadDelegate release]; 5103 #endif 5104 5105 [_private release]; 5106 // [super dealloc] can end up dispatching against _private (3466082) 5107 _private = nil; 5088 // Because the machinations of the view's shutdown may cause self to be added to 5089 // active autorelease pool, we capture any such releases here to ensure they are 5090 // carried out before we are dealloc'd. 5091 @autoreleasepool { 5092 5093 #if PLATFORM(IOS) 5094 if (_private) 5095 [_private->_geolocationProvider stopTrackingWebView:self]; 5096 #endif 5097 5098 // call close to ensure we tear-down completely 5099 // this maintains our old behavior for existing applications 5100 [self close]; 5101 5102 if ([[self class] shouldIncludeInWebKitStatistics]) 5103 --WebViewCount; 5104 5105 #if !PLATFORM(IOS) 5106 if ([self _needsFrameLoadDelegateRetainQuirk]) 5107 [_private->frameLoadDelegate release]; 5108 #endif 5109 5110 [_private release]; 5111 // [super dealloc] can end up dispatching against _private (3466082) 5112 _private = nil; 5113 } 5108 5114 5109 5115 [super dealloc];
Note: See TracChangeset
for help on using the changeset viewer.