Changeset 220707 in webkit


Ignore:
Timestamp:
Aug 14, 2017 10:42:09 AM (7 years ago)
Author:
Chris Dumez
Message:

Unreviewed, rollout r220622 & r220696
https://bugs.webkit.org/show_bug.cgi?id=175482
<rdar://problem/33860695>

Seems to have caused failures on iOS.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:
  • web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-multiple-origins-worker-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
  • web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-count-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt:
  • web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt:
  • web-platform-tests/fetch/http-cache/cc-request-expected.txt:

Source/WebCore:

  • CMakeLists.txt:
  • Modules/beacon/NavigatorBeacon.cpp:

(WebCore::NavigatorBeacon::sendBeacon):

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
(WebCore::FetchBodyOwner::BlobLoader::didFail):

  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchLoader.cpp:

(WebCore::FetchLoader::start):
(WebCore::FetchLoader::didFail):

  • Modules/fetch/FetchLoaderClient.h:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didFail):

  • Modules/fetch/FetchResponse.h:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::finishLoading):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource):
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestSVGDocument):
(WebCore::CachedResourceLoader::requestLinkResource):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::CachedResourceLoader::requestIcon):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestBeaconResource):
(WebCore::CachedResourceLoader::requestMainResource):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::preload):

  • loader/cache/CachedResourceLoader.h:
  • loader/cache/KeepaliveRequestTracker.cpp: Removed.
  • loader/cache/KeepaliveRequestTracker.h: Removed.
  • platform/network/FormData.cpp:

(WebCore::FormData::appendFile):
(WebCore::FormData::appendFileRange):
(WebCore::FormData::appendBlob):
(WebCore::FormData::expandDataStore):

  • platform/network/FormData.h:

LayoutTests:

  • fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt:
  • http/tests/contentextensions/async-xhr-onerror-expected.txt:
  • http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt:
  • http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt:
  • http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt:
  • http/wpt/beacon/beacon-quota-expected.txt: Removed.
  • http/wpt/beacon/beacon-quota.html: Removed.
  • inspector/worker/resources-in-worker-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt:
Location:
trunk
Files:
4 deleted
38 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r220706 r220707  
     12017-08-14  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rollout r220622 & r220696
     4        https://bugs.webkit.org/show_bug.cgi?id=175482
     5        <rdar://problem/33860695>
     6
     7        Seems to have caused failures on iOS.
     8
     9        * fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt:
     10        * http/tests/contentextensions/async-xhr-onerror-expected.txt:
     11        * http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt:
     12        * http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt:
     13        * http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt:
     14        * http/wpt/beacon/beacon-quota-expected.txt: Removed.
     15        * http/wpt/beacon/beacon-quota.html: Removed.
     16        * inspector/worker/resources-in-worker-expected.txt:
     17        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt:
     18        * platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt:
     19
    1202017-08-14  Daniel Bates  <dabates@apple.com>
    221
  • trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt

    r220622 r220707  
    11CONSOLE MESSAGE: line 64: Not allowed to load local resource: nonexistent.html
    2 CONSOLE MESSAGE: line 64: XMLHttpRequest cannot load nonexistent.html. Not allowed to request resource
     2CONSOLE MESSAGE: line 64: XMLHttpRequest cannot load nonexistent.html due to access control checks.
    33
    44Bug 22475: REGRESSION: Async XMLHttpRequest never finishes on nonexistent files anymore
  • trunk/LayoutTests/http/tests/contentextensions/async-xhr-onerror-expected.txt

    r220622 r220707  
    11CONSOLE MESSAGE: line 30: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/async-xhr-onerror.html from loading a resource from http://127.0.0.1:8000/contentextensions/resources/url-blocking-test.js
    2 CONSOLE MESSAGE: line 30: XMLHttpRequest cannot load http://127.0.0.1:8000/contentextensions/resources/url-blocking-test.js. Resource blocked by content blocker
     2CONSOLE MESSAGE: line 30: XMLHttpRequest cannot load http://127.0.0.1:8000/contentextensions/resources/url-blocking-test.js due to access control checks.
    33CONSOLE MESSAGE: line 30: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/async-xhr-onerror.html from loading a resource from http://127.0.0.1:8000/contentextensions/resources/url-blocking-test.js
    4 CONSOLE MESSAGE: line 30: XMLHttpRequest cannot load http://127.0.0.1:8000/contentextensions/resources/url-blocking-test.js. Resource blocked by content blocker
     4CONSOLE MESSAGE: line 30: XMLHttpRequest cannot load http://127.0.0.1:8000/contentextensions/resources/url-blocking-test.js due to access control checks.
    55Asynchronous onreadystatechange status: 0, readyState:1, responseText:
    66Finished runTest. Waiting for callbacks
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt

    r220622 r220707  
    33frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
    44CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi because 'block-all-mixed-content' appears in the Content Security Policy.
    5 CONSOLE MESSAGE: line 30: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi. Not allowed to request resource
     5CONSOLE MESSAGE: line 30: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi due to access control checks.
    66frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    77frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
  • trunk/LayoutTests/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt

    r220622 r220707  
    55main frame - didCommitLoadForFrame
    66CONSOLE MESSAGE: Blocked mixed content http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi because 'block-all-mixed-content' appears in the Content Security Policy.
    7 CONSOLE MESSAGE: line 30: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi. Not allowed to request resource
     7CONSOLE MESSAGE: line 30: XMLHttpRequest cannot load http://127.0.0.1:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi due to access control checks.
    88main frame - didFinishDocumentLoadForFrame
    99main frame - didHandleOnloadEventsForFrame
  • trunk/LayoutTests/http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt

    r220622 r220707  
    11CONSOLE MESSAGE: line 28: [blocked] The page at https://127.0.0.1:8443/security/mixedContent/resources/insecure-xhr-in-main-frame-window.html was not allowed to display insecure content from http://127.0.0.1:8000/.
    22
    3 CONSOLE MESSAGE: line 28: XMLHttpRequest cannot load http://127.0.0.1:8000/. Not allowed to request resource
     3CONSOLE MESSAGE: line 28: XMLHttpRequest cannot load http://127.0.0.1:8000/ due to access control checks.
    44This test opens a HTTPS window that loads insecure data via XHR. We should trigger a mixed content callback because the main frame in the window is HTTPS but now has insecure data.
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r220626 r220707  
     12017-08-14  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rollout r220622 & r220696
     4        https://bugs.webkit.org/show_bug.cgi?id=175482
     5        <rdar://problem/33860695>
     6
     7        Seems to have caused failures on iOS.
     8
     9        * web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:
     10        * web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt:
     11        * web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt:
     12        * web-platform-tests/fetch/api/cors/cors-multiple-origins-worker-expected.txt:
     13        * web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
     14        * web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt:
     15        * web-platform-tests/fetch/api/redirect/redirect-count-expected.txt:
     16        * web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt:
     17        * web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt:
     18        * web-platform-tests/fetch/http-cache/cc-request-expected.txt:
     19
    1202017-08-12  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt

    r220622 r220707  
    66CONSOLE MESSAGE: line 27: Fetch API cannot load about:unicorn. Cross origin requests are only supported for HTTP.
    77
    8 FAIL Fetching about:blank (GET) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
    9 FAIL Fetching about:blank (PUT) is OK promise_test: Unhandled rejection with value: object "TypeError: Preflight response is not successful"
    10 FAIL Fetching about:blank (POST) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
     8FAIL Fetching about:blank (GET) is OK promise_test: Unhandled rejection with value: object "TypeError: Type error"
     9FAIL Fetching about:blank (PUT) is OK promise_test: Unhandled rejection with value: object "TypeError: Type error"
     10FAIL Fetching about:blank (POST) is OK promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1111PASS Fetching about:invalid.com is KO
    1212PASS Fetching about:config is KO
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt

    r220622 r220707  
    11
    2 FAIL Fetching about:blank (GET) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
    3 FAIL Fetching about:blank (PUT) is OK promise_test: Unhandled rejection with value: object "TypeError: Preflight response is not successful"
    4 FAIL Fetching about:blank (POST) is OK promise_test: Unhandled rejection with value: object "TypeError: Cross origin requests are only supported for HTTP."
     2FAIL Fetching about:blank (GET) is OK promise_test: Unhandled rejection with value: object "TypeError: Type error"
     3FAIL Fetching about:blank (PUT) is OK promise_test: Unhandled rejection with value: object "TypeError: Type error"
     4FAIL Fetching about:blank (POST) is OK promise_test: Unhandled rejection with value: object "TypeError: Type error"
    55PASS Fetching about:invalid.com is KO
    66PASS Fetching about:config is KO
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt

    r220622 r220707  
    1212CONSOLE MESSAGE: Fetch API cannot load http://localhost:8801/fetch/api/resources/preflight.py?origin=%2C%20http%3A%2F%2Fexample.com%2C%20https%3A%2F%2Fexample2.com. Access-Control-Allow-Origin cannot contain more than one origin.
    1313
    14 FAIL 3 origins allowed, match the 3rd (http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
    15 FAIL 3 origins allowed, match the 3rd ("*") promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
    16 FAIL 3 origins allowed, match twice (http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
    17 FAIL 3 origins allowed, match twice ("*") promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
    18 FAIL 3 origins allowed, match twice ("*" and http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
     14FAIL 3 origins allowed, match the 3rd (http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Type error"
     15FAIL 3 origins allowed, match the 3rd ("*") promise_test: Unhandled rejection with value: object "TypeError: Type error"
     16FAIL 3 origins allowed, match twice (http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Type error"
     17FAIL 3 origins allowed, match twice ("*") promise_test: Unhandled rejection with value: object "TypeError: Type error"
     18FAIL 3 origins allowed, match twice ("*" and http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1919PASS 3 origins allowed, no match
    2020
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-multiple-origins-worker-expected.txt

    r220622 r220707  
    66CONSOLE MESSAGE: Access-Control-Allow-Origin cannot contain more than one origin.
    77
    8 FAIL 3 origins allowed, match the 3rd (http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
    9 FAIL 3 origins allowed, match the 3rd ("*") promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
    10 FAIL 3 origins allowed, match twice (http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
    11 FAIL 3 origins allowed, match twice ("*") promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
    12 FAIL 3 origins allowed, match twice ("*" and http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Access-Control-Allow-Origin cannot contain more than one origin."
     8FAIL 3 origins allowed, match the 3rd (http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Type error"
     9FAIL 3 origins allowed, match the 3rd ("*") promise_test: Unhandled rejection with value: object "TypeError: Type error"
     10FAIL 3 origins allowed, match twice (http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Type error"
     11FAIL 3 origins allowed, match twice ("*") promise_test: Unhandled rejection with value: object "TypeError: Type error"
     12FAIL 3 origins allowed, match twice ("*" and http://localhost:8800) promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1313PASS 3 origins allowed, no match
    1414
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt

    r220622 r220707  
    88
    99PASS CORS that succeeds with credentials: false; method: GET (allowed: get); header: X-Test,1 (allowed: x-test)
    10 FAIL CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test) promise_test: Unhandled rejection with value: object "TypeError: Method SUPER is not allowed by Access-Control-Allow-Methods."
    11 FAIL CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Method OK is not allowed by Access-Control-Allow-Methods."
     10FAIL CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test) promise_test: Unhandled rejection with value: object "TypeError: Type error"
     11FAIL CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1212PASS CORS that fails with credentials: true; method: OK (allowed: *); header: X-Test,1 (allowed: *)
    1313PASS CORS that fails with credentials: true; method: PUT (allowed: *); header: undefined (allowed: )
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt

    r220622 r220707  
    11
    22PASS CORS that succeeds with credentials: false; method: GET (allowed: get); header: X-Test,1 (allowed: x-test)
    3 FAIL CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test) promise_test: Unhandled rejection with value: object "TypeError: Method SUPER is not allowed by Access-Control-Allow-Methods."
    4 FAIL CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Method OK is not allowed by Access-Control-Allow-Methods."
     3FAIL CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test) promise_test: Unhandled rejection with value: object "TypeError: Type error"
     4FAIL CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *) promise_test: Unhandled rejection with value: object "TypeError: Type error"
    55PASS CORS that fails with credentials: true; method: OK (allowed: *); header: X-Test,1 (allowed: *)
    66PASS CORS that fails with credentials: true; method: PUT (allowed: *); header: undefined (allowed: )
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-expected.txt

    r220622 r220707  
    11
    2 FAIL Redirect 301 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     2FAIL Redirect 301 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    33PASS Redirect 301 21 times
    4 FAIL Redirect 302 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     4FAIL Redirect 302 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    55PASS Redirect 302 21 times
    6 FAIL Redirect 303 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     6FAIL Redirect 303 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    77PASS Redirect 303 21 times
    8 FAIL Redirect 307 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     8FAIL Redirect 307 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    99PASS Redirect 307 21 times
    10 FAIL Redirect 308 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     10FAIL Redirect 308 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1111PASS Redirect 308 21 times
    1212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-worker-expected.txt

    r220622 r220707  
    11
    2 FAIL Redirect 301 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     2FAIL Redirect 301 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    33PASS Redirect 301 21 times
    4 FAIL Redirect 302 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     4FAIL Redirect 302 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    55PASS Redirect 302 21 times
    6 FAIL Redirect 303 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     6FAIL Redirect 303 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    77PASS Redirect 303 21 times
    8 FAIL Redirect 307 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     8FAIL Redirect 307 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    99PASS Redirect 307 21 times
    10 FAIL Redirect 308 20 times promise_test: Unhandled rejection with value: object "TypeError: too many HTTP redirects"
     10FAIL Redirect 308 20 times promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1111PASS Redirect 308 21 times
    1212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt

    r220622 r220707  
    1 CONSOLE MESSAGE: line 44: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
    2 CONSOLE MESSAGE: line 71: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
    3 CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Reached maximum amount of queued data of 64Kb for keepalive requests
    4 CONSOLE MESSAGE: line 88: Fetch API cannot load http://localhost:8800/fetch/api/resources/trickle.py?count=1&ms=0. Reached maximum amount of queued data of 64Kb for keepalive requests
    5 
    6 Harness Error (FAIL), message = Reached maximum amount of queued data of 64Kb for keepalive requests
    71
    82PASS A Keep-Alive fetch() with a small body should succeed.
    93PASS A Keep-Alive fetch() with a body at the Quota Limit should succeed.
    10 PASS A Keep-Alive fetch() with a body over the Quota Limit should reject.
     4FAIL A Keep-Alive fetch() with a body over the Quota Limit should reject. assert_unreached: Should have rejected: undefined Reached unreachable code
    115PASS A Keep-Alive fetch() should return it's allocated Quota upon promise resolution.
    126PASS A Keep-Alive fetch() should return only it's allocated Quota upon promise resolution.
    13 PASS A Keep-Alive fetch() should not be allowed if the Quota is used up.
     7FAIL A Keep-Alive fetch() should not be allowed if the Quota is used up. assert_unreached: Should have rejected: undefined Reached unreachable code
    148
  • trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt

    r220622 r220707  
    1111PASS HTTP cache validates fresh response with ETag when request contains Cache-Control: no-cache.
    1212FAIL HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store. assert_equals: Response used expected 2 but got 1
    13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached. promise_test: Unhandled rejection with value: object "TypeError: can’t load from network"
     13FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached. promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1414
  • trunk/LayoutTests/inspector/worker/resources-in-worker-expected.txt

    r220622 r220707  
    1 CONSOLE MESSAGE: line 1: Unhandled Promise Rejection: TypeError: The requested URL was not found on this server.
     1CONSOLE MESSAGE: line 1: Unhandled Promise Rejection: TypeError: Type error
    22Test for Resources in a Worker.
    33
  • trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt

    r220622 r220707  
    66PASS RequestCache "only-if-cached" mode checks the cache for previously cached content and does not go to the network if a cached response is not found with Etag and fresh response
    77PASS RequestCache "only-if-cached" mode checks the cache for previously cached content and does not go to the network if a cached response is not found with Last-Modified and fresh response
    8 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and fresh response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"
    9 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and fresh response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"
    10 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and stale response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"
    11 FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and stale response promise_test: Unhandled rejection with value: object "TypeError: resource unavailable"
     8FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and fresh response promise_test: Unhandled rejection with value: object "TypeError: Type error"
     9FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and fresh response promise_test: Unhandled rejection with value: object "TypeError: Type error"
     10FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Etag and stale response promise_test: Unhandled rejection with value: object "TypeError: Type error"
     11FAIL RequestCache "only-if-cached" (with "same-origin") uses cached same-origin redirects to same-origin content with Last-Modified and stale response promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1212PASS RequestCache "only-if-cached" (with "same-origin") does not follow redirects across origins and rejects with Etag and fresh response
    1313PASS RequestCache "only-if-cached" (with "same-origin") does not follow redirects across origins and rejects with Last-Modified and fresh response
  • trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt

    r220622 r220707  
    1111PASS HTTP cache validates fresh response with ETag when request contains Cache-Control: no-cache.
    1212PASS HTTP cache doesn't reuse fresh response when request contains Cache-Control: no-store.
    13 FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached. promise_test: Unhandled rejection with value: object "TypeError: can’t load from network"
     13FAIL HTTP cache generates 504 status code when nothing is in cache and request contains Cache-Control: only-if-cached. promise_test: Unhandled rejection with value: object "TypeError: Type error"
    1414
  • trunk/Source/WebCore/CMakeLists.txt

    r220627 r220707  
    20782078    loader/cache/CachedScript.cpp
    20792079    loader/cache/CachedXSLStyleSheet.cpp
    2080     loader/cache/KeepaliveRequestTracker.cpp
    20812080    loader/cache/MemoryCache.cpp
    20822081
  • trunk/Source/WebCore/ChangeLog

    r220706 r220707  
     12017-08-14  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rollout r220622 & r220696
     4        https://bugs.webkit.org/show_bug.cgi?id=175482
     5        <rdar://problem/33860695>
     6
     7        Seems to have caused failures on iOS.
     8
     9        * CMakeLists.txt:
     10        * Modules/beacon/NavigatorBeacon.cpp:
     11        (WebCore::NavigatorBeacon::sendBeacon):
     12        * Modules/fetch/FetchBodyOwner.cpp:
     13        (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
     14        (WebCore::FetchBodyOwner::BlobLoader::didFail):
     15        * Modules/fetch/FetchBodyOwner.h:
     16        * Modules/fetch/FetchLoader.cpp:
     17        (WebCore::FetchLoader::start):
     18        (WebCore::FetchLoader::didFail):
     19        * Modules/fetch/FetchLoaderClient.h:
     20        * Modules/fetch/FetchResponse.cpp:
     21        (WebCore::FetchResponse::BodyLoader::didFail):
     22        * Modules/fetch/FetchResponse.h:
     23        * WebCore.xcodeproj/project.pbxproj:
     24        * loader/DocumentThreadableLoader.cpp:
     25        (WebCore::DocumentThreadableLoader::loadRequest):
     26        * loader/cache/CachedRawResource.cpp:
     27        (WebCore::CachedRawResource::finishLoading):
     28        * loader/cache/CachedResource.cpp:
     29        (WebCore::CachedResource::load):
     30        * loader/cache/CachedResource.h:
     31        (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
     32        * loader/cache/CachedResourceLoader.cpp:
     33        (WebCore::createResource):
     34        (WebCore::CachedResourceLoader::requestImage):
     35        (WebCore::CachedResourceLoader::requestFont):
     36        (WebCore::CachedResourceLoader::requestTextTrack):
     37        (WebCore::CachedResourceLoader::requestCSSStyleSheet):
     38        (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
     39        (WebCore::CachedResourceLoader::requestScript):
     40        (WebCore::CachedResourceLoader::requestXSLStyleSheet):
     41        (WebCore::CachedResourceLoader::requestSVGDocument):
     42        (WebCore::CachedResourceLoader::requestLinkResource):
     43        (WebCore::CachedResourceLoader::requestMedia):
     44        (WebCore::CachedResourceLoader::requestIcon):
     45        (WebCore::CachedResourceLoader::requestRawResource):
     46        (WebCore::CachedResourceLoader::requestBeaconResource):
     47        (WebCore::CachedResourceLoader::requestMainResource):
     48        (WebCore::CachedResourceLoader::requestResource):
     49        (WebCore::CachedResourceLoader::preload):
     50        * loader/cache/CachedResourceLoader.h:
     51        * loader/cache/KeepaliveRequestTracker.cpp: Removed.
     52        * loader/cache/KeepaliveRequestTracker.h: Removed.
     53        * platform/network/FormData.cpp:
     54        (WebCore::FormData::appendFile):
     55        (WebCore::FormData::appendFileRange):
     56        (WebCore::FormData::appendBlob):
     57        (WebCore::FormData::expandDataStore):
     58        * platform/network/FormData.h:
     59
    1602017-08-14  Daniel Bates  <dabates@apple.com>
    261
  • trunk/Source/WebCore/Modules/beacon/NavigatorBeacon.cpp

    r220622 r220707  
    7474        }
    7575    }
    76     ResourceError error;
    77     if (!document.cachedResourceLoader().requestBeaconResource({ WTFMove(request), options }, &error)) {
    78         if (!error.isNull())
    79             document.addConsoleMessage(MessageSource::Network, MessageLevel::Error, error.localizedDescription());
    80         return false;
    81     }
     76    document.cachedResourceLoader().requestBeaconResource({ WTFMove(request), options });
    8277    return true;
    8378}
  • trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp

    r220622 r220707  
    3333#include "HTTPParsers.h"
    3434#include "JSBlob.h"
    35 #include "ResourceError.h"
    3635#include "ResourceResponse.h"
    3736
     
    279278{
    280279    if (response.httpStatusCode() != 200)
    281         didFail({ });
    282 }
    283 
    284 void FetchBodyOwner::BlobLoader::didFail(const ResourceError&)
     280        didFail();
     281}
     282
     283void FetchBodyOwner::BlobLoader::didFail()
    285284{
    286285    // didFail might be called within FetchLoader::start call.
  • trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h

    r220622 r220707  
    8989        void didReceiveResponse(const ResourceResponse&) final;
    9090        void didReceiveData(const char* data, size_t size) final { owner.blobChunk(data, size); }
    91         void didFail(const ResourceError&) final;
     91        void didFail() final;
    9292        void didSucceed() final { owner.blobLoadingSucceeded(); }
    9393
  • trunk/Source/WebCore/Modules/fetch/FetchLoader.cpp

    r220622 r220707  
    3636#include "FetchLoaderClient.h"
    3737#include "FetchRequest.h"
    38 #include "ResourceError.h"
    3938#include "ResourceRequest.h"
    4039#include "ScriptExecutionContext.h"
     
    5049    auto urlForReading = BlobURL::createPublicURL(context.securityOrigin());
    5150    if (urlForReading.isEmpty()) {
    52         m_client.didFail({ errorDomainWebKitInternal, 0, URL(), ASCIILiteral("Could not create URL for Blob") });
     51        m_client.didFail();
    5352        return;
    5453    }
     
    9089
    9190    if (!context.shouldBypassMainWorldContentSecurityPolicy() && !contentSecurityPolicy.allowConnectToSource(fetchRequest.url())) {
    92         m_client.didFail({ errorDomainWebKitInternal, 0, fetchRequest.url(), ASCIILiteral("Not allowed by ContentSecurityPolicy"), ResourceError::Type::AccessControl });
     91        m_client.didFail();
    9392        return;
    9493    }
     
    146145}
    147146
    148 void FetchLoader::didFail(const ResourceError& error)
     147void FetchLoader::didFail(const ResourceError&)
    149148{
    150     m_client.didFail(error);
     149    m_client.didFail();
    151150}
    152151
  • trunk/Source/WebCore/Modules/fetch/FetchLoaderClient.h

    r220622 r220707  
    3333namespace WebCore {
    3434
    35 class ResourceError;
    3635class ResourceResponse;
    3736
     
    4544
    4645    virtual void didSucceed() = 0;
    47     virtual void didFail(const ResourceError&) = 0;
     46    virtual void didFail() = 0;
    4847};
    4948
  • trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp

    r220622 r220707  
    3434#include "JSBlob.h"
    3535#include "JSFetchResponse.h"
    36 #include "ResourceError.h"
    3736#include "ScriptExecutionContext.h"
    3837
     
    140139}
    141140
    142 void FetchResponse::BodyLoader::didFail(const ResourceError& error)
     141void FetchResponse::BodyLoader::didFail()
    143142{
    144143    ASSERT(m_response.hasPendingActivity());
    145144    if (m_promise)
    146         std::exchange(m_promise, std::nullopt)->reject(Exception { TypeError, String(error.localizedDescription()) });
     145        std::exchange(m_promise, std::nullopt)->reject(TypeError);
    147146
    148147#if ENABLE(STREAMS_API)
  • trunk/Source/WebCore/Modules/fetch/FetchResponse.h

    r220622 r220707  
    119119        // FetchLoaderClient API
    120120        void didSucceed() final;
    121         void didFail(const ResourceError&) final;
     121        void didFail() final;
    122122        void didReceiveResponse(const ResourceResponse&) final;
    123123        void didReceiveData(const char*, size_t) final;
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r220627 r220707  
    34763476                83A4A9F91CE7FD8100709B00 /* JSXMLDocumentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83A4A9F81CE7FD7E00709B00 /* JSXMLDocumentCustom.cpp */; };
    34773477                83B2D1751B8BCD6A00A02E47 /* NativeNodeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E959E11B8BC22B004D9385 /* NativeNodeFilter.h */; settings = {ATTRIBUTES = (Private, ); }; };
    3478                 83B74EF51F3E0BF200996BC7 /* KeepaliveRequestTracker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83B74EF21F3E0BD700996BC7 /* KeepaliveRequestTracker.cpp */; };
    3479                 83B74EF61F3E0BF200996BC7 /* KeepaliveRequestTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 83B74EF31F3E0BD700996BC7 /* KeepaliveRequestTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
    34803478                83B9687B19F8AB83004EF7AF /* StyleBuilderConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 83B9687919F8AB83004EF7AF /* StyleBuilderConverter.h */; };
    34813479                83BB5C881D5D6F45005A71F4 /* AllDescendantsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 83BB5C871D5D6F3A005A71F4 /* AllDescendantsCollection.h */; };
     
    1160711605                839AAFEB1A0C0C8D00605F99 /* HTMLWBRElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLWBRElement.h; sourceTree = "<group>"; };
    1160811606                83A4A9F81CE7FD7E00709B00 /* JSXMLDocumentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLDocumentCustom.cpp; sourceTree = "<group>"; };
    11609                 83B74EF21F3E0BD700996BC7 /* KeepaliveRequestTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeepaliveRequestTracker.cpp; sourceTree = "<group>"; };
    11610                 83B74EF31F3E0BD700996BC7 /* KeepaliveRequestTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeepaliveRequestTracker.h; sourceTree = "<group>"; };
    1161111607                83B9687919F8AB83004EF7AF /* StyleBuilderConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilderConverter.h; sourceTree = "<group>"; };
    1161211608                83BB5C871D5D6F3A005A71F4 /* AllDescendantsCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AllDescendantsCollection.h; sourceTree = "<group>"; };
     
    2239722393                                BCB16C0F0979C3BD00467741 /* CachedXSLStyleSheet.h */,
    2239822394                                F587864902DE3A9A01EA4122 /* CachePolicy.h */,
    22399                                 83B74EF21F3E0BD700996BC7 /* KeepaliveRequestTracker.cpp */,
    22400                                 83B74EF31F3E0BD700996BC7 /* KeepaliveRequestTracker.h */,
    2240122395                                BCB16BFE0979C3BD00467741 /* MemoryCache.cpp */,
    2240222396                                BCB16BFF0979C3BD00467741 /* MemoryCache.h */,
     
    2685626850                                A584FE2618637DAB00843B10 /* CommandLineAPIModuleSource.h in Headers */,
    2685726851                                6550B6A2099DF0270090D781 /* Comment.h in Headers */,
     26852                                511CA67E1F3905A60019E074 /* ServiceWorkerJob.h in Headers */,
    2685826853                                57E664FC1E73703300765536 /* CommonCryptoDERUtilities.h in Headers */,
    2685926854                                E1FE137518402A6700892F13 /* CommonCryptoUtilities.h in Headers */,
     
    2758027575                                977B3867122883E900B81FF8 /* HTMLDocumentParser.h in Headers */,
    2758127576                                93F198E608245E59001E9ABC /* HTMLElement.h in Headers */,
     27577                                51BEB6391F3B94B0005029B9 /* ServiceWorkerRegistrationOptions.h in Headers */,
    2758227578                                A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */,
    2758327579                                977B37241228721700B81FF8 /* HTMLElementStack.h in Headers */,
     
    2861028606                                1A762C7A0A074F2600989F5B /* JSXPathResult.h in Headers */,
    2861128607                                BCEFE1EB0DCA5F6400739219 /* JSXSLTProcessor.h in Headers */,
    28612                                 83B74EF61F3E0BF200996BC7 /* KeepaliveRequestTracker.h in Headers */,
    2861328608                                85031B440A44EFC700F992E0 /* KeyboardEvent.h in Headers */,
    2861428609                                1AE00D59182DAC8D00087DD7 /* KeyedCoding.h in Headers */,
     
    2884228837                                07EE76EF1BEA619800F89133 /* MockRealtimeVideoSourceMac.h in Headers */,
    2884328838                                CDF2B0171820540700F2B424 /* MockSourceBufferPrivate.h in Headers */,
     28839                                511CA6801F39331F0019E074 /* ServiceWorkerJobClient.h in Headers */,
    2884428840                                CDF2B0191820540700F2B424 /* MockTracks.h in Headers */,
    2884528841                                C6D74AD509AA282E000B0A52 /* ModifySelectionListLevel.h in Headers */,
     
    2915529151                                41103AAC1E39791000769F03 /* RealtimeOutgoingAudioSource.h in Headers */,
    2915629152                                BC4368E80C226E32005EFB5F /* Rect.h in Headers */,
     29153                                511CA6841F3A3CD90019E074 /* ServiceWorkerRegistrationParameters.h in Headers */,
    2915729154                                FD45A958175D414C00C21EC8 /* RectangleShape.h in Headers */,
    2915829155                                9831AE4A154225C900FE2644 /* ReferrerPolicy.h in Headers */,
     
    2949729494                                516F7F6D1C31E39A00F111DC /* ServerOpenDBRequest.h in Headers */,
    2949829495                                2D93AEE319DF5641002A86C3 /* ServicesOverlayController.h in Headers */,
     29496                                5182C23F1F313A090059BA7C /* ServiceWorker.h in Headers */,
     29497                                5182C2411F313A090059BA7C /* ServiceWorkerContainer.h in Headers */,
     29498                                5182C2431F313A090059BA7C /* ServiceWorkerGlobalScope.h in Headers */,
     29499                                5182C2451F313A090059BA7C /* ServiceWorkerRegistration.h in Headers */,
     29500                                51F174FF1F35899700C74950 /* ServiceWorkerUpdateViaCache.h in Headers */,
    2949929501                                756B2CE118B7101600FECFAA /* SessionID.h in Headers */,
    2950029502                                93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */,
     
    2982929831                                B2227A780D00BF220071B782 /* SVGPathSegLinetoHorizontal.h in Headers */,
    2983029832                                83C1D430178D5AB500141E68 /* SVGPathSegLinetoHorizontalAbs.h in Headers */,
     29833                                511CA67A1F3904B10019E074 /* ServiceWorkerProvider.h in Headers */,
    2983129834                                83C1D431178D5AB500141E68 /* SVGPathSegLinetoHorizontalRel.h in Headers */,
    2983229835                                83C1D432178D5AB500141E68 /* SVGPathSegLinetoRel.h in Headers */,
     
    3154931552                                5160F4980B0AA75F00C1D2AF /* HistoryItemMac.mm in Sources */,
    3155031553                                4969B0F213D0B33F00DF3521 /* HitTestingTransformState.cpp in Sources */,
     31554                                511CA6831F3A3CD90019E074 /* ServiceWorkerRegistrationParameters.cpp in Sources */,
    3155131555                                2D8287F616E4A0380086BD00 /* HitTestLocation.cpp in Sources */,
    3155231556                                9307F1D70AF2D59000DBA31A /* HitTestResult.cpp in Sources */,
     
    3262232626                                E182568F0EF2B02D00933242 /* JSWorkerGlobalScope.cpp in Sources */,
    3262332627                                E1C36D340EB0A094007410BC /* JSWorkerGlobalScopeBase.cpp in Sources */,
     32628                                511CA6791F3904B10019E074 /* ServiceWorkerProvider.cpp in Sources */,
    3262432629                                E18258AC0EF3CD7000933242 /* JSWorkerGlobalScopeCustom.cpp in Sources */,
    3262532630                                E1C362F00EAF2AA9007410BC /* JSWorkerLocation.cpp in Sources */,
     
    3264232647                                A1C7FAA2133A5D3500D6732D /* JSXPathResultCustom.cpp in Sources */,
    3264332648                                BCEFE1EA0DCA5F6400739219 /* JSXSLTProcessor.cpp in Sources */,
    32644                                 83B74EF51F3E0BF200996BC7 /* KeepaliveRequestTracker.cpp in Sources */,
    3264532649                                85031B430A44EFC700F992E0 /* KeyboardEvent.cpp in Sources */,
    3264632650                                517A63C31B74318700E7DCDC /* KeyedDecoderCF.cpp in Sources */,
     
    3317133175                                A8DF4AF00980C42C0052981B /* RenderTableRow.cpp in Sources */,
    3317233176                                A8DF4AED0980C42C0052981B /* RenderTableSection.cpp in Sources */,
     33177                                511CA67D1F3905A60019E074 /* ServiceWorkerJob.cpp in Sources */,
    3317333178                                BCEA488B097D93020094C9E4 /* RenderText.cpp in Sources */,
    3317433179                                AB67D1A8097F3AE300F9392E /* RenderTextControl.cpp in Sources */,
     
    3335333358                                516F7F6E1C31E39C00F111DC /* ServerOpenDBRequest.cpp in Sources */,
    3335433359                                2D93AEE419DF5641002A86C3 /* ServicesOverlayController.mm in Sources */,
     33360                                5182C23E1F313A090059BA7C /* ServiceWorker.cpp in Sources */,
     33361                                5182C2401F313A090059BA7C /* ServiceWorkerContainer.cpp in Sources */,
     33362                                5182C2421F313A090059BA7C /* ServiceWorkerGlobalScope.cpp in Sources */,
     33363                                5182C2441F313A090059BA7C /* ServiceWorkerRegistration.cpp in Sources */,
    3335533364                                511F7D441EB1C39100E47B83 /* SessionID.cpp in Sources */,
    3335633365                                93309E0F099E64920056E581 /* SetNodeAttributeCommand.cpp in Sources */,
  • trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp

    r220622 r220707  
    452452        // We create an URL here as the request will be moved in requestRawResource
    453453        URL requestUrl = newRequest.resourceRequest().url();
    454         ResourceError error;
    455         m_resource = m_document.cachedResourceLoader().requestRawResource(WTFMove(newRequest), &error);
     454        m_resource = m_document.cachedResourceLoader().requestRawResource(WTFMove(newRequest));
    456455        if (m_resource)
    457456            m_resource->addClient(*this);
    458457        else {
    459             if (error.isNull()) {
    460                 // FIXME: Since we receive a synchronous error, this is probably due to some AccessControl checks. We should try to retrieve the actual error.
    461                 logErrorAndFail(ResourceError(String(), 0, requestUrl, String(), ResourceError::Type::AccessControl));
    462             } else
    463                 logErrorAndFail(error);
     458            // FIXME: Since we receive a synchronous error, this is probably due to some AccessControl checks. We should try to retrieve the actual error.
     459            logErrorAndFail(ResourceError(String(), 0, requestUrl, String(), ResourceError::Type::AccessControl));
    464460        }
    465461        return;
  • trunk/Source/WebCore/loader/cache/CachedRawResource.cpp

    r220696 r220707  
    9494
    9595#if USE(QUICK_LOOK)
    96     m_allowEncodedDataReplacement = m_loader && !m_loader->isQuickLookResource();
     96    m_allowEncodedDataReplacement = !m_loader->isQuickLookResource();
    9797#endif
    9898
  • trunk/Source/WebCore/loader/cache/CachedResource.cpp

    r220632 r220707  
    261261    }
    262262
    263     if (m_options.keepAlive) {
    264         if (!cachedResourceLoader.keepaliveRequestTracker().tryRegisterRequest(*this)) {
    265             setResourceError({ errorDomainWebKitInternal, 0, request.url(), ASCIILiteral("Reached maximum amount of queued data of 64Kb for keepalive requests") });
    266             failBeforeStarting();
    267             return;
    268         }
    269         // FIXME: We should not special-case Beacon here.
    270         if (type() == CachedResource::Beacon) {
     263    // FIXME: We should not special-case Beacon here.
     264    if (m_options.keepAlive && type() == CachedResource::Beacon) {
    271265        ASSERT(m_origin);
    272             // Beacon is not exposed to workers so it is safe to rely on the document here.
    273             auto* document = cachedResourceLoader.document();
    274             auto* contentSecurityPolicy = document && !document->shouldBypassMainWorldContentSecurityPolicy() ? document->contentSecurityPolicy() : nullptr;
    275             platformStrategies()->loaderStrategy()->createPingHandle(frame.loader().networkingContext(), request, *m_origin, contentSecurityPolicy, m_options);
    276             // FIXME: We currently do not get notified when ping loads finish so we treat them as finishing right away.
    277             finishLoading(nullptr);
    278             return;
    279         }
     266        // Beacon is not exposed to workers so it is safe to rely on the document here.
     267        auto* document = cachedResourceLoader.document();
     268        auto* contentSecurityPolicy = document && !document->shouldBypassMainWorldContentSecurityPolicy() ? document->contentSecurityPolicy() : nullptr;
     269        platformStrategies()->loaderStrategy()->createPingHandle(frame.loader().networkingContext(), request, *m_origin, contentSecurityPolicy, m_options);
     270        return;
    280271    }
    281272
  • trunk/Source/WebCore/loader/cache/CachedResource.h

    r220632 r220707  
    163163    bool isImage() const { return type() == ImageResource; }
    164164    // FIXME: CachedRawResource could be a main resource, an audio/video resource, or a raw XHR/icon resource.
    165     bool isMainOrMediaOrIconOrRawResource() const { return type() == MainResource || type() == MediaResource || type() == Icon || type() == RawResource || type() == Beacon; }
     165    bool isMainOrMediaOrIconOrRawResource() const { return type() == MainResource || type() == MediaResource || type() == Icon || type() == RawResource; }
    166166
    167167    // Whether this request should impact request counting and delay window.onload.
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp

    r220632 r220707  
    104104    case CachedResource::FontResource:
    105105        return new CachedFont(WTFMove(request), sessionID);
    106     case CachedResource::Beacon:
    107106    case CachedResource::MediaResource:
    108107    case CachedResource::RawResource:
     
    110109    case CachedResource::MainResource:
    111110        return new CachedRawResource(WTFMove(request), type, sessionID);
     111    case CachedResource::Beacon:
     112        return new CachedResource(WTFMove(request), CachedResource::Beacon, sessionID);
    112113#if ENABLE(XSLT)
    113114    case CachedResource::XSLStyleSheet:
     
    182183}
    183184
    184 CachedResourceHandle<CachedImage> CachedResourceLoader::requestImage(CachedResourceRequest&& request, ResourceError* error)
     185CachedResourceHandle<CachedImage> CachedResourceLoader::requestImage(CachedResourceRequest&& request)
    185186{
    186187    if (Frame* frame = this->frame()) {
     
    196197
    197198    auto defer = clientDefersImage(request.resourceRequest().url()) ? DeferOption::DeferredByClient : DeferOption::NoDefer;
    198     return downcast<CachedImage>(requestResource(CachedResource::ImageResource, WTFMove(request), error, ForPreload::No, defer).get());
    199 }
    200 
    201 CachedResourceHandle<CachedFont> CachedResourceLoader::requestFont(CachedResourceRequest&& request, bool isSVG, ResourceError* error)
     199    return downcast<CachedImage>(requestResource(CachedResource::ImageResource, WTFMove(request), ForPreload::No, defer).get());
     200}
     201
     202CachedResourceHandle<CachedFont> CachedResourceLoader::requestFont(CachedResourceRequest&& request, bool isSVG)
    202203{
    203204#if ENABLE(SVG_FONTS)
    204205    if (isSVG)
    205         return downcast<CachedSVGFont>(requestResource(CachedResource::SVGFontResource, WTFMove(request), error).get());
     206        return downcast<CachedSVGFont>(requestResource(CachedResource::SVGFontResource, WTFMove(request)).get());
    206207#else
    207208    UNUSED_PARAM(isSVG);
    208209#endif
    209     return downcast<CachedFont>(requestResource(CachedResource::FontResource, WTFMove(request), error).get());
     210    return downcast<CachedFont>(requestResource(CachedResource::FontResource, WTFMove(request)).get());
    210211}
    211212
    212213#if ENABLE(VIDEO_TRACK)
    213 CachedResourceHandle<CachedTextTrack> CachedResourceLoader::requestTextTrack(CachedResourceRequest&& request, ResourceError* error)
    214 {
    215     return downcast<CachedTextTrack>(requestResource(CachedResource::TextTrackResource, WTFMove(request), error).get());
    216 }
    217 #endif
    218 
    219 CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestCSSStyleSheet(CachedResourceRequest&& request, ResourceError* error)
    220 {
    221     return downcast<CachedCSSStyleSheet>(requestResource(CachedResource::CSSStyleSheet, WTFMove(request), error).get());
    222 }
    223 
    224 CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestUserCSSStyleSheet(CachedResourceRequest&& request, ResourceError*)
     214CachedResourceHandle<CachedTextTrack> CachedResourceLoader::requestTextTrack(CachedResourceRequest&& request)
     215{
     216    return downcast<CachedTextTrack>(requestResource(CachedResource::TextTrackResource, WTFMove(request)).get());
     217}
     218#endif
     219
     220CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestCSSStyleSheet(CachedResourceRequest&& request)
     221{
     222    return downcast<CachedCSSStyleSheet>(requestResource(CachedResource::CSSStyleSheet, WTFMove(request)).get());
     223}
     224
     225CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestUserCSSStyleSheet(CachedResourceRequest&& request)
    225226{
    226227    ASSERT(document());
     
    248249}
    249250
    250 CachedResourceHandle<CachedScript> CachedResourceLoader::requestScript(CachedResourceRequest&& request, ResourceError* error)
    251 {
    252     return downcast<CachedScript>(requestResource(CachedResource::Script, WTFMove(request), error).get());
     251CachedResourceHandle<CachedScript> CachedResourceLoader::requestScript(CachedResourceRequest&& request)
     252{
     253    return downcast<CachedScript>(requestResource(CachedResource::Script, WTFMove(request)).get());
    253254}
    254255
    255256#if ENABLE(XSLT)
    256 CachedResourceHandle<CachedXSLStyleSheet> CachedResourceLoader::requestXSLStyleSheet(CachedResourceRequest&& request, ResourceError* error)
    257 {
    258     return downcast<CachedXSLStyleSheet>(requestResource(CachedResource::XSLStyleSheet, WTFMove(request), error).get());
    259 }
    260 #endif
    261 
    262 CachedResourceHandle<CachedSVGDocument> CachedResourceLoader::requestSVGDocument(CachedResourceRequest&& request, ResourceError* error)
    263 {
    264     return downcast<CachedSVGDocument>(requestResource(CachedResource::SVGDocumentResource, WTFMove(request), error).get());
     257CachedResourceHandle<CachedXSLStyleSheet> CachedResourceLoader::requestXSLStyleSheet(CachedResourceRequest&& request)
     258{
     259    return downcast<CachedXSLStyleSheet>(requestResource(CachedResource::XSLStyleSheet, WTFMove(request)).get());
     260}
     261#endif
     262
     263CachedResourceHandle<CachedSVGDocument> CachedResourceLoader::requestSVGDocument(CachedResourceRequest&& request)
     264{
     265    return downcast<CachedSVGDocument>(requestResource(CachedResource::SVGDocumentResource, WTFMove(request)).get());
    265266}
    266267
    267268#if ENABLE(LINK_PREFETCH)
    268 CachedResourceHandle<CachedResource> CachedResourceLoader::requestLinkResource(CachedResource::Type type, CachedResourceRequest&& request, ResourceError* error)
     269CachedResourceHandle<CachedResource> CachedResourceLoader::requestLinkResource(CachedResource::Type type, CachedResourceRequest&& request)
    269270{
    270271    ASSERT(frame());
    271272    ASSERT(type == CachedResource::LinkPrefetch || type == CachedResource::LinkSubresource);
    272     return requestResource(type, WTFMove(request), error);
    273 }
    274 #endif
    275 
    276 CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestMedia(CachedResourceRequest&& request, ResourceError* error)
    277 {
    278     return downcast<CachedRawResource>(requestResource(CachedResource::MediaResource, WTFMove(request), error).get());
    279 }
    280 
    281 CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestIcon(CachedResourceRequest&& request, ResourceError* error)
    282 {
    283     return downcast<CachedRawResource>(requestResource(CachedResource::Icon, WTFMove(request), error).get());
    284 }
    285 
    286 CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestRawResource(CachedResourceRequest&& request, ResourceError* error)
    287 {
    288     return downcast<CachedRawResource>(requestResource(CachedResource::RawResource, WTFMove(request), error).get());
    289 }
    290 
    291 CachedResourceHandle<CachedResource> CachedResourceLoader::requestBeaconResource(CachedResourceRequest&& request, ResourceError* error)
    292 {
    293     return requestResource(CachedResource::Beacon, WTFMove(request), error).get();
    294 }
    295 
    296 CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestMainResource(CachedResourceRequest&& request, ResourceError* error)
    297 {
    298     return downcast<CachedRawResource>(requestResource(CachedResource::MainResource, WTFMove(request), error).get());
     273    return requestResource(type, WTFMove(request));
     274}
     275#endif
     276
     277CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestMedia(CachedResourceRequest&& request)
     278{
     279    return downcast<CachedRawResource>(requestResource(CachedResource::MediaResource, WTFMove(request)).get());
     280}
     281
     282CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestIcon(CachedResourceRequest&& request)
     283{
     284    return downcast<CachedRawResource>(requestResource(CachedResource::Icon, WTFMove(request)).get());
     285}
     286
     287CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestRawResource(CachedResourceRequest&& request)
     288{
     289    return downcast<CachedRawResource>(requestResource(CachedResource::RawResource, WTFMove(request)).get());
     290}
     291
     292CachedResourceHandle<CachedResource> CachedResourceLoader::requestBeaconResource(CachedResourceRequest&& request)
     293{
     294    return requestResource(CachedResource::Beacon, WTFMove(request)).get();
     295}
     296
     297CachedResourceHandle<CachedRawResource> CachedResourceLoader::requestMainResource(CachedResourceRequest&& request)
     298{
     299    return downcast<CachedRawResource>(requestResource(CachedResource::MainResource, WTFMove(request)).get());
    299300}
    300301
     
    689690}
    690691
    691 CachedResourceHandle<CachedResource> CachedResourceLoader::requestResource(CachedResource::Type type, CachedResourceRequest&& request, ResourceError* error, ForPreload forPreload, DeferOption defer)
     692CachedResourceHandle<CachedResource> CachedResourceLoader::requestResource(CachedResource::Type type, CachedResourceRequest&& request, ForPreload forPreload, DeferOption defer)
    692693{
    693694    if (Document* document = this->document())
     
    700701    if (!url.isValid()) {
    701702        RELEASE_LOG_IF_ALLOWED("requestResource: URL is invalid (frame = %p)", frame());
    702         if (error)
    703             *error = { errorDomainWebKitInternal, 0, url, ASCIILiteral("URL is invalid") };
    704703        return nullptr;
    705704    }
     
    710709    if (!canRequest(type, url, request, forPreload)) {
    711710        RELEASE_LOG_IF_ALLOWED("requestResource: Not allowed to request resource (frame = %p)", frame());
    712         if (error)
    713             *error = { errorDomainWebKitInternal, 0, url, ASCIILiteral("Not allowed to request resource"), ResourceError::Type::AccessControl };
    714711        return nullptr;
    715712    }
     
    729726                return resource;
    730727            }
    731             if (error)
    732                 *error = { errorDomainWebKitInternal, 0, url, ASCIILiteral("Resource blocked by content blocker"), ResourceError::Type::AccessControl };
    733728            return nullptr;
    734729        }
     
    835830            if (resource->allowsCaching() && resource->inCache())
    836831                memoryCache.remove(*resource);
    837             if (error)
    838                 *error = resource->resourceError();
    839832            return nullptr;
    840833        }
     
    12531246        request.setCharset(m_document->charset());
    12541247
    1255     CachedResourceHandle<CachedResource> resource = requestResource(type, WTFMove(request), nullptr, ForPreload::Yes);
     1248    CachedResourceHandle<CachedResource> resource = requestResource(type, WTFMove(request), ForPreload::Yes);
    12561249    if (resource && (!m_preloads || !m_preloads->contains(resource.get()))) {
    12571250        // Fonts need special treatment since just creating the resource doesn't trigger a load.
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.h

    r220622 r220707  
    3131#include "CachedResourceRequest.h"
    3232#include "ContentSecurityPolicy.h"
    33 #include "KeepaliveRequestTracker.h"
    3433#include "ResourceTimingInformation.h"
    3534#include "Timer.h"
     
    7372    ~CachedResourceLoader();
    7473
    75     CachedResourceHandle<CachedImage> requestImage(CachedResourceRequest&&, ResourceError* = nullptr);
    76     CachedResourceHandle<CachedCSSStyleSheet> requestCSSStyleSheet(CachedResourceRequest&&, ResourceError* = nullptr);
    77     CachedResourceHandle<CachedCSSStyleSheet> requestUserCSSStyleSheet(CachedResourceRequest&&, ResourceError* = nullptr);
    78     CachedResourceHandle<CachedScript> requestScript(CachedResourceRequest&&, ResourceError* = nullptr);
    79     CachedResourceHandle<CachedFont> requestFont(CachedResourceRequest&&, bool isSVG, ResourceError* = nullptr);
    80     CachedResourceHandle<CachedRawResource> requestMedia(CachedResourceRequest&&, ResourceError* = nullptr);
    81     CachedResourceHandle<CachedRawResource> requestIcon(CachedResourceRequest&&, ResourceError* = nullptr);
    82     CachedResourceHandle<CachedResource> requestBeaconResource(CachedResourceRequest&&, ResourceError* = nullptr);
    83     CachedResourceHandle<CachedRawResource> requestRawResource(CachedResourceRequest&&, ResourceError* = nullptr);
    84     CachedResourceHandle<CachedRawResource> requestMainResource(CachedResourceRequest&&, ResourceError* = nullptr);
    85     CachedResourceHandle<CachedSVGDocument> requestSVGDocument(CachedResourceRequest&&, ResourceError* = nullptr);
     74    CachedResourceHandle<CachedImage> requestImage(CachedResourceRequest&&);
     75    CachedResourceHandle<CachedCSSStyleSheet> requestCSSStyleSheet(CachedResourceRequest&&);
     76    CachedResourceHandle<CachedCSSStyleSheet> requestUserCSSStyleSheet(CachedResourceRequest&&);
     77    CachedResourceHandle<CachedScript> requestScript(CachedResourceRequest&&);
     78    CachedResourceHandle<CachedFont> requestFont(CachedResourceRequest&&, bool isSVG);
     79    CachedResourceHandle<CachedRawResource> requestMedia(CachedResourceRequest&&);
     80    CachedResourceHandle<CachedRawResource> requestIcon(CachedResourceRequest&&);
     81    CachedResourceHandle<CachedResource> requestBeaconResource(CachedResourceRequest&&);
     82    CachedResourceHandle<CachedRawResource> requestRawResource(CachedResourceRequest&&);
     83    CachedResourceHandle<CachedRawResource> requestMainResource(CachedResourceRequest&&);
     84    CachedResourceHandle<CachedSVGDocument> requestSVGDocument(CachedResourceRequest&&);
    8685#if ENABLE(XSLT)
    87     CachedResourceHandle<CachedXSLStyleSheet> requestXSLStyleSheet(CachedResourceRequest&&, ResourceError* = nullptr);
     86    CachedResourceHandle<CachedXSLStyleSheet> requestXSLStyleSheet(CachedResourceRequest&&);
    8887#endif
    8988#if ENABLE(LINK_PREFETCH)
    90     CachedResourceHandle<CachedResource> requestLinkResource(CachedResource::Type, CachedResourceRequest&&, ResourceError* = nullptr);
     89    CachedResourceHandle<CachedResource> requestLinkResource(CachedResource::Type, CachedResourceRequest&&);
    9190#endif
    9291#if ENABLE(VIDEO_TRACK)
    93     CachedResourceHandle<CachedTextTrack> requestTextTrack(CachedResourceRequest&&, ResourceError* = nullptr);
     92    CachedResourceHandle<CachedTextTrack> requestTextTrack(CachedResourceRequest&&);
    9493#endif
    9594
     
    148147    bool isAlwaysOnLoggingAllowed() const;
    149148
    150     KeepaliveRequestTracker& keepaliveRequestTracker() { return m_keepaliveRequestTracker; }
    151 
    152149private:
    153150    explicit CachedResourceLoader(DocumentLoader*);
     
    156153    enum class DeferOption { NoDefer, DeferredByClient };
    157154
    158     CachedResourceHandle<CachedResource> requestResource(CachedResource::Type, CachedResourceRequest&&, ResourceError* = nullptr, ForPreload = ForPreload::No, DeferOption = DeferOption::NoDefer);
     155    CachedResourceHandle<CachedResource> requestResource(CachedResource::Type, CachedResourceRequest&&, ForPreload = ForPreload::No, DeferOption = DeferOption::NoDefer);
    159156    CachedResourceHandle<CachedResource> revalidateResource(CachedResourceRequest&&, CachedResource&);
    160157    CachedResourceHandle<CachedResource> loadResource(CachedResource::Type, CachedResourceRequest&&);
     
    197194
    198195    ResourceTimingInformation m_resourceTimingInfo;
    199     KeepaliveRequestTracker m_keepaliveRequestTracker;
    200196
    201197    // 29 bits left
  • trunk/Source/WebCore/platform/network/FormData.cpp

    r220622 r220707  
    3434#include "Page.h"
    3535#include "TextEncoding.h"
    36 #include "ThreadableBlobRegistry.h"
    3736
    3837namespace WebCore {
     
    124123
    125124    return formData;
    126 }
    127 
    128 uint64_t FormDataElement::lengthInBytes() const
    129 {
    130     switch (m_type) {
    131     case Type::Data:
    132         return m_data.size();
    133     case Type::EncodedFile: {
    134         if (m_fileLength != BlobDataItem::toEndOfFile)
    135             return m_fileLength;
    136         long long fileSize;
    137         if (getFileSize(m_shouldGenerateFile ? m_generatedFilename : m_filename, fileSize))
    138             return fileSize;
    139         return 0;
    140     }
    141     case Type::EncodedBlob:
    142         return blobRegistry().blobSize(m_url);
    143     }
    144     ASSERT_NOT_REACHED();
    145     return 0;
    146125}
    147126
     
    168147{
    169148    m_elements.append(FormDataElement(filename, 0, BlobDataItem::toEndOfFile, invalidFileTime(), shouldGenerateFile));
    170     m_lengthInBytes = std::nullopt;
    171149}
    172150
     
    174152{
    175153    m_elements.append(FormDataElement(filename, start, length, expectedModificationTime, shouldGenerateFile));
    176     m_lengthInBytes = std::nullopt;
    177154}
    178155
     
    180157{
    181158    m_elements.append(FormDataElement(blobURL));
    182     m_lengthInBytes = std::nullopt;
    183159}
    184160
     
    269245char* FormData::expandDataStore(size_t size)
    270246{
    271     m_lengthInBytes = std::nullopt;
    272247    if (m_elements.isEmpty() || m_elements.last().m_type != FormDataElement::Type::Data)
    273248        m_elements.append(FormDataElement());
     
    412387}
    413388
    414 uint64_t FormData::lengthInBytes() const
    415 {
    416     if (!m_lengthInBytes) {
    417         uint64_t length = 0;
    418         for (auto& element : m_elements)
    419             length += element.lengthInBytes();
    420         m_lengthInBytes = length;
    421     }
    422     return *m_lengthInBytes;
    423 }
    424 
    425389} // namespace WebCore
  • trunk/Source/WebCore/platform/network/FormData.h

    r220622 r220707  
    7070    }
    7171
    72     uint64_t lengthInBytes() const;
    73 
    7472    FormDataElement isolatedCopy() const;
    7573
     
    257255    }
    258256
    259     uint64_t lengthInBytes() const;
    260 
    261257private:
    262258    FormData();
     
    264260
    265261    void appendKeyValuePairItems(const FormDataList&, const TextEncoding&, bool isMultiPartForm, Document*, EncodingType = FormURLEncoded);
     262
    266263    bool hasGeneratedFiles() const;
    267264    bool hasOwnedGeneratedFiles() const;
     
    273270    Vector<char> m_boundary;
    274271    bool m_containsPasswordData { false };
    275     mutable std::optional<uint64_t> m_lengthInBytes;
    276272};
    277273
Note: See TracChangeset for help on using the changeset viewer.