self.location.href is incorrect in shared workers in case of redirects
https://bugs.webkit.org/show_bug.cgi?id=236340
Reviewed by Geoffrey Garen.
LayoutTests/imported/w3c:
Rebaseline WPT tests that are now passing.
- web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker-expected.txt:
- web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker-expected.txt:
- web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker-expected.txt:
Source/WebCore:
self.location.href is incorrect in shared workers in case of redirects. It should be
the URL of the last request, not the first one.
No new tests, rebaselined existing tests.
- loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::redirectReceived):
- loader/ThreadableLoaderClient.h:
(WebCore::ThreadableLoaderClient::redirectReceived):
- loader/ThreadableLoaderClientWrapper.h:
(WebCore::ThreadableLoaderClientWrapper::redirectReceived):
- loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::redirectReceived):
- loader/WorkerThreadableLoader.h:
- workers/Worker.cpp:
(WebCore::Worker::notifyFinished):
- workers/WorkerFetchResult.h:
(WebCore::WorkerFetchResult::isolatedCopy const):
(WebCore::workerFetchError):
(WebCore::WorkerFetchResult::encode const):
(WebCore::WorkerFetchResult::decode):
- workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::WorkerScriptLoader::redirectReceived):
(WebCore::WorkerScriptLoader::fetchResult const):
- workers/WorkerScriptLoader.h:
(WebCore::WorkerScriptLoader::script const):
(WebCore::WorkerScriptLoader::lastRequestURL const):
(WebCore::WorkerScriptLoader::script): Deleted.
- workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
- workers/service/ServiceWorkerContainer.h:
- workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::notifyFinished):
- workers/service/ServiceWorkerJobClient.h:
- workers/shared/SharedWorkerScriptLoader.cpp:
(WebCore::SharedWorkerScriptLoader::notifyFinished):
- workers/shared/context/SharedWorkerThreadProxy.cpp:
(WebCore::generateWorkerParameters):
(WebCore::SharedWorkerThreadProxy::SharedWorkerThreadProxy):
- workers/shared/context/SharedWorkerThreadProxy.h:
Source/WebKit:
self.location.href is incorrect in shared workers in case of redirects. It should be the URL of
the last request, not the first one.
- NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
(WebKit::ServiceWorkerSoftUpdateLoader::didFinishLoading):
- NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.cpp:
(WebKit::WebSharedWorkerServerToContextConnection::launchSharedWorker):
- WebProcess/Storage/WebSharedWorkerContextManagerConnection.cpp:
(WebKit::WebSharedWorkerContextManagerConnection::launchSharedWorker):
- WebProcess/Storage/WebSharedWorkerContextManagerConnection.h:
- WebProcess/Storage/WebSharedWorkerContextManagerConnection.messages.in:
|