Title: [226333] trunk
Revision
226333
Author
commit-qu...@webkit.org
Date
2018-01-02 12:38:04 -0800 (Tue, 02 Jan 2018)

Log Message

Memory cache should not reuse resources with different credential fetch option
https://bugs.webkit.org/show_bug.cgi?id=181212

Patch by Youenn Fablet <you...@apple.com> on 2018-01-02
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt:

Source/WebCore:

Covered by rebased test.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy const):

LayoutTests:

* TestExpectations: Removing test flakiness expectation.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (226332 => 226333)


--- trunk/LayoutTests/ChangeLog	2018-01-02 20:28:31 UTC (rev 226332)
+++ trunk/LayoutTests/ChangeLog	2018-01-02 20:38:04 UTC (rev 226333)
@@ -1,3 +1,12 @@
+2018-01-02  Youenn Fablet  <you...@apple.com>
+
+        Memory cache should not reuse resources with different credential fetch option
+        https://bugs.webkit.org/show_bug.cgi?id=181212
+
+        Reviewed by Alex Christensen.
+
+        * TestExpectations: Removing test flakiness expectation.
+
 2018-01-02  Jiewen Tan  <jiewen_...@apple.com>
 
         Update Credential Management API for WebAuthentication

Modified: trunk/LayoutTests/TestExpectations (226332 => 226333)


--- trunk/LayoutTests/TestExpectations	2018-01-02 20:28:31 UTC (rev 226332)
+++ trunk/LayoutTests/TestExpectations	2018-01-02 20:38:04 UTC (rev 226333)
@@ -177,9 +177,9 @@
 imported/w3c/web-platform-tests/service-workers/service-worker/websocket.https.html [ Pass Failure ]
 imported/w3c/web-platform-tests/service-workers/service-worker/windowclient-navigate.https.html [ Pass Failure ]
 imported/w3c/web-platform-tests/streams/readable-byte-streams/detached-buffers.serviceworker.https.html [ Pass Failure ]
-imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html [ DumpJSConsoleLogInStdErr Pass Failure ]
 imported/w3c/web-platform-tests/service-workers/service-worker/update.https.html [ Pass Failure ]
 
+imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https.html [ DumpJSConsoleLogInStdErr ]
 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-response-taint.https.html [ DumpJSConsoleLogInStdErr ]
 [ Debug ] imported/w3c/web-platform-tests/service-workers/service-worker/getregistrations.https.html [ Slow ]

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (226332 => 226333)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-01-02 20:28:31 UTC (rev 226332)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-01-02 20:38:04 UTC (rev 226333)
@@ -1,3 +1,12 @@
+2018-01-02  Youenn Fablet  <you...@apple.com>
+
+        Memory cache should not reuse resources with different credential fetch option
+        https://bugs.webkit.org/show_bug.cgi?id=181212
+
+        Reviewed by Alex Christensen.
+
+        * web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt:
+
 2018-01-02  Jiewen Tan  <jiewen_...@apple.com>
 
         Update Credential Management API for WebAuthentication

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt (226332 => 226333)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt	2018-01-02 20:28:31 UTC (rev 226332)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt	2018-01-02 20:38:04 UTC (rev 226333)
@@ -1,4 +1,3 @@
- 
 
-FAIL Verify CORS XHR of fetch() in a Service Worker assert_equals: expected "finish" but got "failure:Result of url:https://localhost:9443/service-workers/service-worker/resources/fetch-access-control.py?mode=cors&url=""  with_credentials: true must be FAIL but SUCCESS"
+PASS Verify CORS XHR of fetch() in a Service Worker 
 

Modified: trunk/Source/WebCore/ChangeLog (226332 => 226333)


--- trunk/Source/WebCore/ChangeLog	2018-01-02 20:28:31 UTC (rev 226332)
+++ trunk/Source/WebCore/ChangeLog	2018-01-02 20:38:04 UTC (rev 226333)
@@ -1,3 +1,15 @@
+2018-01-02  Youenn Fablet  <you...@apple.com>
+
+        Memory cache should not reuse resources with different credential fetch option
+        https://bugs.webkit.org/show_bug.cgi?id=181212
+
+        Reviewed by Alex Christensen.
+
+        Covered by rebased test.
+
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
+
 2018-01-02  Jiewen Tan  <jiewen_...@apple.com>
 
         Update Credential Management API for WebAuthentication

Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (226332 => 226333)


--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2018-01-02 20:28:31 UTC (rev 226332)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2018-01-02 20:38:04 UTC (rev 226333)
@@ -1116,7 +1116,7 @@
     // This helps with the case where the server sends back
     // "Access-Control-Allow-Origin: *" all the time, but some of the
     // client's requests are made without CORS and some with.
-    if (existingResource->resourceRequest().allowCookies() != request.allowCookies()) {
+    if (existingResource->resourceRequest().allowCookies() != request.allowCookies() || existingResource->options().credentials != cachedResourceRequest.options().credentials) {
         LOG(ResourceLoading, "CachedResourceLoader::determineRevalidationPolicy reloading due to difference in credentials settings.");
         logMemoryCacheResourceRequest(frame(), DiagnosticLoggingKeys::inMemoryCacheKey(), DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey());
         return Reload;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to