Changeset 229558 in webkit
- Timestamp:
- Mar 12, 2018 3:58:54 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229539 r229558 1 2018-03-12 Ali Juma <ajuma@chromium.org> 2 3 http/tests/workers/service/service-worker-download.https.html times out with async policy delegates 4 https://bugs.webkit.org/show_bug.cgi?id=183479 5 6 Reviewed by Youenn Fablet. 7 8 Add layout test coverage. 9 10 * http/tests/workers/service/service-worker-download-async-delegates.https-expected.txt: Added. 11 * http/tests/workers/service/service-worker-download-async-delegates.https.html: Added. 12 1 13 2018-03-12 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WebKit/ChangeLog
r229542 r229558 1 2018-03-12 Ali Juma <ajuma@chromium.org> 2 3 http/tests/workers/service/service-worker-download.https.html times out with async policy delegates 4 https://bugs.webkit.org/show_bug.cgi?id=183479 5 6 Reviewed by Youenn Fablet. 7 8 Ensure that ServiceWorkerFetchClient::m_isCheckingResponse is set before code that depends on it 9 executes. This bit was set by code that's posted to the runloop using 'callOnMainThread' in 10 ServiceWorkerFetchClient::didReceiveResponse. But when didReceiveResponse is executing, tasks for 11 handling didReceiveData, didFail, or didFinish may already have been posted to the runloop, and in 12 that case would execute before m_isCheckingResponse gets set, and then incorrectly fail to 13 early-out. Fix this by directly setting m_isCheckingResponse in didReceiveResponse. 14 15 * WebProcess/Storage/ServiceWorkerClientFetch.cpp: 16 (WebKit::ServiceWorkerClientFetch::start): 17 (WebKit::ServiceWorkerClientFetch::didReceiveResponse): 18 1 19 2018-03-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 20 -
trunk/Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp
r229477 r229558 69 69 auto referrer = request.httpReferrer(); 70 70 71 m_didFail = false; 72 m_didFinish = false; 73 71 74 // We are intercepting fetch calls after going through the HTTP layer, which may add some specific headers. 72 75 cleanHTTPRequestHeadersForAccessControl(request, options.httpHeadersToKeep); … … 101 104 void ServiceWorkerClientFetch::didReceiveResponse(ResourceResponse&& response) 102 105 { 106 m_isCheckingResponse = true; 103 107 callOnMainThread([this, protectedThis = makeRef(*this), response = WTFMove(response)]() mutable { 104 if (!m_loader) 105 return; 108 if (!m_loader) { 109 m_isCheckingResponse = false; 110 return; 111 } 106 112 107 113 if (auto error = validateResponse(response)) { 114 m_isCheckingResponse = false; 108 115 m_loader->didFail(error.value()); 109 116 ASSERT(!m_loader); … … 115 122 116 123 if (response.isRedirection() && response.httpHeaderFields().contains(HTTPHeaderName::Location)) { 124 m_isCheckingResponse = false; 125 continueLoadingAfterCheckingResponse(); 117 126 m_redirectionStatus = RedirectionStatus::Receiving; 118 127 m_loader->willSendRequest(m_loader->request().redirectedRequest(response, m_shouldClearReferrerOnHTTPSToHTTPRedirect), response, [protectedThis = makeRef(*this), this](ResourceRequest&& request) { … … 143 152 response.setURL(m_loader->request().url()); 144 153 145 m_isCheckingResponse = true;146 154 m_loader->didReceiveResponse(response, [this, protectedThis = WTFMove(protectedThis)] { 147 155 m_isCheckingResponse = false;
Note: See TracChangeset
for help on using the changeset viewer.