Changeset 204163 in webkit
- Timestamp:
- Aug 5, 2016 12:25:15 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r204150 r204163 1 2016-08-05 Youenn Fablet <youenn@apple.com> 2 3 DocumentThreadableLoader should report an error when getting a null CachedResource 4 https://bugs.webkit.org/show_bug.cgi?id=160444 5 6 Reviewed by Alex Christensen. 7 8 * fast/frames/frame-unload-crash.html: 9 * http/tests/contentextensions/async-xhr-onerror-expected.txt: 10 * http/tests/eventsource/eventsource-reconnect-during-navigate-crash-expected.txt: 11 * http/tests/navigation/subframe-pagehide-handler-starts-load-expected.txt: 12 * http/tests/navigation/subframe-pagehide-handler-starts-load2-expected.txt: 13 * http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt: 14 1 15 2016-08-04 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/LayoutTests/fast/frames/frame-unload-crash-expected.txt
r42455 r204163 1 1 frame "<!--framePath //<!--frame0-->/<!--frame0-->-->" - has 1 onunload handler(s) 2 CONSOLE MESSAGE: line 13: XMLHttpRequest cannot load frame-unload-crash-2.html due to access control checks. 2 3 This is a test for bug 25136: CRASH in DocumentLoader::removeSubresourceLoader due to null m_frame. If successful, PASS should be printed below. 3 4 -
trunk/LayoutTests/http/tests/contentextensions/async-xhr-onerror-expected.txt
r191077 r204163 1 1 CONSOLE 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 due to access control checks. 2 3 CONSOLE 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 due to access control checks. 3 5 Asynchronous onreadystatechange status: 0, readyState:1, responseText: 4 6 Finished runTest. Waiting for callbacks -
trunk/LayoutTests/http/tests/eventsource/eventsource-reconnect-during-navigate-crash-expected.txt
r93726 r204163 1 CONSOLE MESSAGE: EventSource cannot load http://127.0.0.1:8000/eventsource/resources/reconnect.php. 1 2 -
trunk/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load-expected.txt
r185337 r204163 1 CONSOLE MESSAGE: line 8: XMLHttpRequest cannot load http://127.0.0.1:8000/navigation/resources/resources/slow-resource.pl?delay=3000 due to access control checks. 1 2 Tests that we don't crash when a load is started in a subframe on 'pagehide' handling 2 3 -
trunk/LayoutTests/http/tests/navigation/subframe-pagehide-handler-starts-load2-expected.txt
r185337 r204163 1 CONSOLE MESSAGE: line 9: XMLHttpRequest cannot load http://127.0.0.1:8000/navigation/resources/resources/slow-resource.pl?delay=3000 due to access control checks. 1 2 Tests that we don't crash when a load is started in a subframe on 'pagehide' handling 2 3 -
trunk/LayoutTests/http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt
r185296 r204163 1 1 CONSOLE 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/. 2 2 3 CONSOLE MESSAGE: line 28: XMLHttpRequest cannot load http://127.0.0.1:8000/ due to access control checks. 3 4 This 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
r204161 r204163 1 2016-08-05 Youenn Fablet <youenn@apple.com> 2 3 DocumentThreadableLoader should report an error when getting a null CachedResource 4 https://bugs.webkit.org/show_bug.cgi?id=160444 5 6 Reviewed by Alex Christensen. 7 8 * web-platform-tests/XMLHttpRequest/event-error-expected.txt: 9 * web-platform-tests/XMLHttpRequest/getresponseheader-error-state-expected.txt: 10 * web-platform-tests/XMLHttpRequest/timeout-cors-async-expected.txt: 11 * web-platform-tests/fetch/api/cors/cors-cookies-expected.txt: 12 * web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt: 13 1 14 2016-08-04 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-error-expected.txt
r191546 r204163 1 1 Blocked access to external URL http://example.nonexist/ 2 CONSOLE MESSAGE: line 22: XMLHttpRequest cannot load http://example.nonexist/ due to access control checks. 2 3 3 4 PASS XMLHttpRequest Test: event - error -
trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/getresponseheader-error-state-expected.txt
r191546 r204163 1 1 Blocked access to external URL http://www1.localhost:8800/XMLHttpRequest/resources/nocors/folder.txt 2 CONSOLE MESSAGE: line 32: XMLHttpRequest cannot load http://www1.localhost:8800/XMLHttpRequest/resources/nocors/folder.txt due to access control checks. 2 3 3 4 PASS XMLHttpRequest: getResponseHeader() in error state (failing cross-origin test) -
trunk/LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/timeout-cors-async-expected.txt
r191546 r204163 1 1 Blocked access to external URL http://www2.localhost:8800/XMLHttpRequest/resources/corsenabled.py?delay=2&code=200 2 CONSOLE MESSAGE: line 40: XMLHttpRequest cannot load http://www2.localhost:8800/XMLHttpRequest/resources/corsenabled.py?delay=2&code=200 due to access control checks. 2 3 3 4 FAIL XMLHttpRequest: timeout event and cross-origin request assert_true: timeout event should fire expected true got false -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-expected.txt
r203900 r204163 1 1 Blocked access to external URL http://www.localhost:8800/fetch/api/resources/inspect-headers.py?cors&headers=cookie 2 3 Harness Error (TIMEOUT), message = null4 2 5 3 PASS Omit mode: no cookie sent … … 8 6 PASS Include mode: remote cookies are not sent with local request 9 7 PASS Same-origin mode: cookies are discarded in cors request 10 TIMEOUT Include mode: remote cookies are not sent with other remote request Test timed out 8 FAIL Include mode: remote cookies are not sent with other remote request promise_test: Unhandled rejection with value: object "TypeError: Type error" 11 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/cors/cors-cookies-worker-expected.txt
r204023 r204163 1 1 Blocked access to external URL http://www.localhost:8800/fetch/api/resources/inspect-headers.py?cors&headers=cookie 2 3 Harness Error (TIMEOUT), message = null4 2 5 3 PASS Omit mode: no cookie sent … … 8 6 PASS Include mode: remote cookies are not sent with local request 9 7 PASS Same-origin mode: cookies are discarded in cors request 10 TIMEOUT Include mode: remote cookies are not sent with other remote request Test timed out 8 FAIL Include mode: remote cookies are not sent with other remote request promise_test: Unhandled rejection with value: object "TypeError: Type error" 11 9 -
trunk/Source/WebCore/ChangeLog
r204161 r204163 1 2016-08-05 Youenn Fablet <youenn@apple.com> 2 3 DocumentThreadableLoader should report an error when getting a null CachedResource 4 https://bugs.webkit.org/show_bug.cgi?id=160444 5 6 Reviewed by Alex Christensen. 7 8 Covered by existing and rebased tests. 9 10 * loader/DocumentThreadableLoader.cpp: 11 (WebCore::DocumentThreadableLoader::loadRequest): Calling didFail with an AccessControl error if unable to have a CachedResource. 12 The resource error type AccessControl is important as it indicates to some clients that they should not retry loading the same resource (EventSource notably). 13 * xml/XMLHttpRequest.cpp: 14 (WebCore::XMLHttpRequest::createRequest): Removed handling of ThreadableLoader::create returning null. 15 This should be handled in didFail callback. This allows aligning behavior of 16 WorkerThreadableLoaderi::MainThreadBridge and XMLHttpRequest as ThreadableLoader clients. 17 (WebCore::XMLHttpRequest::didFail): Handle the case of didFail being called synchronously from ThreadableLoader::create. 18 In that case, use a timer to dispatch network events asynchronously. 19 1 20 2016-08-04 Chris Dumez <cdumez@apple.com> 2 21 -
trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp
r204117 r204163 369 369 if (m_resource) 370 370 m_resource->addClient(this); 371 371 else { 372 // FIXME: Since we receive a synchronous error, this is probably due to some AccessControl checks. We should try to retrieve the actual error. 373 m_client->didFail(ResourceError(String(), 0, newRequest.resourceRequest().url(), String(), ResourceError::Type::AccessControl)); 374 } 372 375 return; 373 376 } -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r204117 r204163 716 716 m_loader = ThreadableLoader::create(*scriptExecutionContext(), *this, WTFMove(request), options); 717 717 718 // Either loader is null or some error was synchronously sent to us. 719 ASSERT(m_loader || !m_sendFlag); 720 718 721 // Neither this object nor the JavaScript wrapper should be deleted while 719 722 // a request is in progress because we need to keep the listeners alive, 720 723 // and they are referenced by the JavaScript wrapper. 721 setPendingActivity(this); 722 if (!m_loader) { 723 m_sendFlag = false; 724 m_timeoutTimer.stop(); 725 m_networkErrorTimer.startOneShot(0); 726 } 724 if (m_loader) 725 setPendingActivity(this); 727 726 } else { 728 727 InspectorInstrumentation::willLoadXHRSynchronously(scriptExecutionContext()); … … 957 956 void XMLHttpRequest::didFail(const ResourceError& error) 958 957 { 959 960 958 // If we are already in an error state, for instance we called abort(), bail out early. 961 959 if (m_error) … … 983 981 } 984 982 983 // In case didFail is called synchronously on an asynchronous XHR call, let's dispatch network error asynchronously 984 if (m_async && m_sendFlag && !m_loader) { 985 m_sendFlag = false; 986 setPendingActivity(this); 987 m_timeoutTimer.stop(); 988 m_networkErrorTimer.startOneShot(0); 989 return; 990 } 985 991 m_exceptionCode = NETWORK_ERR; 986 992 networkError();
Note: See TracChangeset
for help on using the changeset viewer.