Title: [224639] trunk/Source/WebCore
- Revision
- 224639
- Author
- commit-qu...@webkit.org
- Date
- 2017-11-09 11:13:36 -0800 (Thu, 09 Nov 2017)
Log Message
CachedResourceLoader::requestRawResource should not assert when destination is set in the context of a service worker
https://bugs.webkit.org/show_bug.cgi?id=179491
Patch by Youenn Fablet <you...@apple.com> on 2017-11-09
Reviewed by Chris Dumez.
No change of behavior.
requestRawResource on web page should have the destination set as the empty string as per fetch spec.
In the context of a service worker, requestRawResource may be used with any destination.
Updating assertion accordingly.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestRawResource):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (224638 => 224639)
--- trunk/Source/WebCore/ChangeLog 2017-11-09 19:00:59 UTC (rev 224638)
+++ trunk/Source/WebCore/ChangeLog 2017-11-09 19:13:36 UTC (rev 224639)
@@ -1,5 +1,20 @@
2017-11-09 Youenn Fablet <you...@apple.com>
+ CachedResourceLoader::requestRawResource should not assert when destination is set in the context of a service worker
+ https://bugs.webkit.org/show_bug.cgi?id=179491
+
+ Reviewed by Chris Dumez.
+
+ No change of behavior.
+ requestRawResource on web page should have the destination set as the empty string as per fetch spec.
+ In the context of a service worker, requestRawResource may be used with any destination.
+ Updating assertion accordingly.
+
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::requestRawResource):
+
+2017-11-09 Youenn Fablet <you...@apple.com>
+
ResourceErrorBase::setType should not ASSERT if it is a no op
https://bugs.webkit.org/show_bug.cgi?id=179490
Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (224638 => 224639)
--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2017-11-09 19:00:59 UTC (rev 224638)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2017-11-09 19:13:36 UTC (rev 224639)
@@ -306,7 +306,7 @@
ResourceErrorOr<CachedResourceHandle<CachedRawResource>> CachedResourceLoader::requestRawResource(CachedResourceRequest&& request)
{
- ASSERT(request.options().destination == FetchOptions::Destination::EmptyString);
+ ASSERT(request.options().destination == FetchOptions::Destination::EmptyString || request.options().serviceWorkersMode == ServiceWorkersMode::None);
return castCachedResourceTo<CachedRawResource>(requestResource(CachedResource::RawResource, WTFMove(request)));
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes