Changeset 244364 in webkit
- Timestamp:
- Apr 16, 2019, 5:18:11 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp (modified) (2 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r244361 r244364 1 2019-04-16 Alex Christensen <achristensen@webkit.org> 2 3 REGRESSION(r244162) Clearing website data from ephemeral WKWebsiteDataStore should finish instead of asserting or hanging 4 https://bugs.webkit.org/show_bug.cgi?id=196995 5 6 Reviewed by Brady Eidson. 7 8 Always call CompletionHandlers. Otherwise things hang or assert. 9 I added an API test that asserts without this change so we don't regress this again. 10 11 * NetworkProcess/cache/CacheStorageEngine.cpp: 12 (WebKit::CacheStorage::Engine::clearAllCaches): 13 (WebKit::CacheStorage::Engine::clearCachesForOrigin): 14 1 15 2019-04-16 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngine.cpp
r244162 r244364 526 526 auto callbackAggregator = CallbackAggregator::create([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)]() mutable { 527 527 if (!this->shouldPersist()) 528 return ;528 return completionHandler(); 529 529 530 530 this->clearAllCachesFromDisk(WTFMove(completionHandler)); … … 554 554 auto callbackAggregator = CallbackAggregator::create([this, protectedThis = makeRef(*this), origin, completionHandler = WTFMove(completionHandler)]() mutable { 555 555 if (!this->shouldPersist()) 556 return ;556 return completionHandler(); 557 557 558 558 this->clearCachesForOriginFromDisk(origin, [completionHandler = WTFMove(completionHandler)]() mutable { -
trunk/Tools/ChangeLog
r244361 r244364 1 2019-04-16 Alex Christensen <achristensen@webkit.org> 2 3 REGRESSION(r244162) Clearing website data from ephemeral WKWebsiteDataStore should finish instead of asserting or hanging 4 https://bugs.webkit.org/show_bug.cgi?id=196995 5 6 Reviewed by Brady Eidson. 7 8 * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: 9 (TEST): 10 1 11 2019-04-16 Chris Dumez <cdumez@apple.com> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm
r242339 r244364 28 28 #import "PlatformUtilities.h" 29 29 #import "Test.h" 30 #import "TestWKWebView.h" 30 31 #import <WebKit/WKWebsiteDataStorePrivate.h> 31 32 #import <WebKit/WebKit.h> … … 49 50 TestWebKitAPI::Util::run(&readyToContinue); 50 51 } 52 53 TEST(WKWebsiteDataStore, RemoveEphemeralData) 54 { 55 auto configuration = adoptNS([WKWebViewConfiguration new]); 56 [configuration setWebsiteDataStore:[WKWebsiteDataStore nonPersistentDataStore]]; 57 auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); 58 [webView synchronouslyLoadTestPageNamed:@"simple"]; 59 __block bool done = false; 60 [[configuration websiteDataStore] removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler: ^{ 61 done = true; 62 }]; 63 TestWebKitAPI::Util::run(&done); 64 }
Note:
See TracChangeset
for help on using the changeset viewer.