Changeset 199088 in webkit
- Timestamp:
- Apr 5, 2016 6:31:13 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r199081 r199088 1 2016-04-05 Brent Fulgham <bfulgham@apple.com> 2 3 Correct applicationWillTerminate logic for ResourceLoadStatistics 4 https://bugs.webkit.org/show_bug.cgi?id=156249 5 <rdar://problem/25179611> 6 7 Reviewed by Andy Estes. 8 9 The applicationWillTerminate handling for ResourceLoadStatistics incorrectly 10 assumes that a ResourceLoadStatistics object will always be present. 11 1. The termination handling for 'dataStoresWithStorageManagers' should be 12 calling 'applicationWillTerminate' on any ResourceLoadStatistics 13 objects attached to the dataStore. 14 2. platformInitialize should null-check before attempting to dispatch. 15 3. platformDestroy should null check before attempting to dispatch. 16 17 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: 18 (WebKit::WebsiteDataStore::platformInitialize): 19 (WebKit::WebsiteDataStore::platformDestroy): Invoke 'applicationWillTerminate' on 20 m_resourceLoadStatistics if present. 21 1 22 2016-04-05 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 23 -
trunk/Source/WebKit2/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
r197592 r199088 61 61 #endif 62 62 terminationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:notificationName object:nil queue:nil usingBlock:^(NSNotification *note) { 63 for (auto& dataStore : dataStoresWithStorageManagers()) 63 for (auto& dataStore : dataStoresWithStorageManagers()) { 64 64 dataStore->m_storageManager->applicationWillTerminate(); 65 66 m_resourceLoadStatistics->applicationWillTerminate(); 65 if (dataStore->m_resourceLoadStatistics) 66 dataStore->m_resourceLoadStatistics->applicationWillTerminate(); 67 } 67 68 }]; 68 69 } … … 70 71 ASSERT(!dataStoresWithStorageManagers().contains(this)); 71 72 dataStoresWithStorageManagers().append(this); 72 m_resourceLoadStatistics->readDataFromDiskIfNeeded(); 73 if (m_resourceLoadStatistics) 74 m_resourceLoadStatistics->readDataFromDiskIfNeeded(); 73 75 } 74 76 75 77 void WebsiteDataStore::platformDestroy() 76 78 { 79 if (m_resourceLoadStatistics) 80 m_resourceLoadStatistics->applicationWillTerminate(); 81 77 82 if (!m_storageManager) 78 83 return;
Note: See TracChangeset
for help on using the changeset viewer.