Title: [255057] trunk/Source/WebCore
- Revision
- 255057
- Author
- [email protected]
- Date
- 2020-01-24 00:19:26 -0800 (Fri, 24 Jan 2020)
Log Message
Make sure DOMCacheStorage::retrieveCaches always calls its completionHandler
https://bugs.webkit.org/show_bug.cgi?id=206647
Reviewed by Chris Dumez.
* Modules/cache/DOMCacheStorage.cpp:
(WebCore::DOMCacheStorage::retrieveCaches):
In case of context being stopped, make sure the completion handler is still called.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (255056 => 255057)
--- trunk/Source/WebCore/ChangeLog 2020-01-24 06:37:35 UTC (rev 255056)
+++ trunk/Source/WebCore/ChangeLog 2020-01-24 08:19:26 UTC (rev 255057)
@@ -1,3 +1,14 @@
+2020-01-24 youenn fablet <[email protected]>
+
+ Make sure DOMCacheStorage::retrieveCaches always calls its completionHandler
+ https://bugs.webkit.org/show_bug.cgi?id=206647
+
+ Reviewed by Chris Dumez.
+
+ * Modules/cache/DOMCacheStorage.cpp:
+ (WebCore::DOMCacheStorage::retrieveCaches):
+ In case of context being stopped, make sure the completion handler is still called.
+
2020-01-23 Per Arne Vollan <[email protected]>
[Cocoa] Media mime types map should be created in the UI process
Modified: trunk/Source/WebCore/Modules/cache/DOMCacheStorage.cpp (255056 => 255057)
--- trunk/Source/WebCore/Modules/cache/DOMCacheStorage.cpp 2020-01-24 06:37:35 UTC (rev 255056)
+++ trunk/Source/WebCore/Modules/cache/DOMCacheStorage.cpp 2020-01-24 08:19:26 UTC (rev 255057)
@@ -150,23 +150,25 @@
}
m_connection->retrieveCaches(*origin, m_updateCounter, [this, callback = WTFMove(callback), pendingActivity = makePendingActivity(*this)](CacheInfosOrError&& result) mutable {
- if (!m_isStopped) {
- if (!result.has_value()) {
- callback(DOMCacheEngine::convertToExceptionAndLog(scriptExecutionContext(), result.error()));
- return;
- }
+ if (m_isStopped) {
+ callback(errorToException(DOMCacheEngine::Error::Stopped));
+ return;
+ }
+ if (!result.has_value()) {
+ callback(DOMCacheEngine::convertToExceptionAndLog(scriptExecutionContext(), result.error()));
+ return;
+ }
- auto& cachesInfo = result.value();
+ auto& cachesInfo = result.value();
- if (m_updateCounter != cachesInfo.updateCounter) {
- m_updateCounter = cachesInfo.updateCounter;
+ if (m_updateCounter != cachesInfo.updateCounter) {
+ m_updateCounter = cachesInfo.updateCounter;
- m_caches = WTF::map(WTFMove(cachesInfo.infos), [this] (CacheInfo&& info) {
- return findCacheOrCreate(WTFMove(info));
- });
- }
- callback(WTF::nullopt);
+ m_caches = WTF::map(WTFMove(cachesInfo.infos), [this] (CacheInfo&& info) {
+ return findCacheOrCreate(WTFMove(info));
+ });
}
+ callback(WTF::nullopt);
});
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes