Changeset 195900 in webkit
- Timestamp:
- Jan 30, 2016 11:22:58 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r195899 r195900 1 2016-01-30 David Kilzer <ddkilzer@apple.com> 2 3 [iOS] WebKit1 apps crash in ___ZN7WebCore16DiskCacheMonitorC2ERKNS_15ResourceRequestENS_9SessionIDEPK20_CFCachedURLResponse_block_invoke1 4 <http://webkit.org/b/153710> 5 <rdar://problem/23116706> 6 7 Reviewed by Darin Adler. 8 9 * loader/cocoa/DiskCacheMonitorCocoa.mm: 10 (WebCore::DiskCacheMonitor::DiskCacheMonitor): 11 - Fix race condition on iOS WebKit1 clients by calling the block 12 to cancel the DiskCacheMonitor on the WebThread, which is the 13 same thread where the CFCachedURLResponseCallBackBlock is 14 called. 15 - Removed whitespace to adhere to style. 16 1 17 2016-01-30 Ryosuke Niwa <rniwa@webkit.org> 2 18 -
trunk/Source/WebCore/loader/cocoa/DiskCacheMonitorCocoa.mm
r183234 r195900 72 72 // Set up a delayed callback to cancel this monitor if the resource hasn't been cached yet. 73 73 __block DiskCacheMonitor* rawMonitor = this; 74 75 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * diskCacheMonitorTimeout), dispatch_get_main_queue(), ^{ 74 auto cancelMonitorBlock = ^{ 76 75 delete rawMonitor; // Balanced by "new DiskCacheMonitor" in monitorFileBackingStoreCreation. 77 76 rawMonitor = nullptr; 78 }); 77 }; 78 79 #if USE(WEB_THREAD) 80 auto cancelMonitorBlockToRun = ^{ 81 WebThreadRun(cancelMonitorBlock); 82 }; 83 #else 84 auto cancelMonitorBlockToRun = cancelMonitorBlock; 85 #endif 86 87 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * diskCacheMonitorTimeout), dispatch_get_main_queue(), cancelMonitorBlockToRun); 79 88 80 89 // Set up the disk caching callback to create the ShareableResource and send it to the WebProcess. … … 97 106 98 107 #if USE(WEB_THREAD) 99 CFCachedURLResponseCallBackBlock blockToRun = ^ 108 CFCachedURLResponseCallBackBlock blockToRun = ^(CFCachedURLResponseRef response) 100 109 { 101 110 CFRetain(response); 102 WebThreadRun(^ 111 WebThreadRun(^{ 103 112 block(response); 104 113 CFRelease(response);
Note: See TracChangeset
for help on using the changeset viewer.