Fix virtual/service-worker-servicification/external/wpt/service-workers/service-worker/import-scripts-updated-flag.https.html |
||||
Issue descriptionimport-scripts-updated-flag.https.html is failing when S13nSW is on and NetworkService is off. == stderr == [19584:19591:0509/231349.676134:FATAL:url_loader.cc(309)] Check failed: !url_loader_client_.internal_state() ->handle() .QuerySignalsState() .peer_remote(). URLLoader must not be used by the renderer when network service is disabled, as that skips security checks in ResourceDispatcherHost. The only acceptable usage is the browser using SimpleURLLoader. #0 0x00000396a84c base::debug::StackTrace::StackTrace() #1 0x0000038dc0fb logging::LogMessage::~LogMessage() #2 0x000004ed107b network::URLLoader::URLLoader() #3 0x000004ed0667 network::URLLoaderFactory::CreateLoaderAndStart() #4 0x0000016fd916 network::mojom::URLLoaderFactoryProxy_CreateLoaderAndStart_Message::Dispatch() #5 0x0000016fd825 network::mojom::URLLoaderFactoryStubDispatch::Accept() #6 0x0000039a1e72 mojo::InterfaceEndpointClient::HandleValidatedMessage() #7 0x0000039a19f6 mojo::FilterChain::Accept() #8 0x0000039a3372 mojo::InterfaceEndpointClient::HandleIncomingMessage() #9 0x0000039aa97d mojo::internal::MultiplexRouter::ProcessIncomingMessage() #10 0x0000039a9d40 mojo::internal::MultiplexRouter::Accept() #11 0x0000039a19f6 mojo::FilterChain::Accept() #12 0x00000399f32b mojo::Connector::ReadSingleMessage() #13 0x00000399fdc4 mojo::Connector::ReadAllAvailableMessages() #14 0x00000399fc26 mojo::Connector::OnHandleReadyInternal() #15 0x00000209e844 mojo::SimpleWatcher::DiscardReadyState() #16 0x000003999523 mojo::SimpleWatcher::OnHandleReady() #17 0x0000039999b6 mojo::SimpleWatcher::Context::Notify() #18 0x0000039983c3 mojo::SimpleWatcher::Context::CallNotify() #19 0x0000020d37f7 mojo::edk::WatcherDispatcher::InvokeWatchCallback() #20 0x0000020d2f02 mojo::edk::Watch::InvokeCallback() #21 0x0000020ce1b5 mojo::edk::RequestContext::~RequestContext() #22 0x0000020ce1c1 mojo::edk::RequestContext::~RequestContext() #23 0x0000020c21ed mojo::edk::NodeChannel::OnChannelMessage() #24 0x0000020b3080 mojo::edk::Channel::OnReadComplete() #25 0x0000020da2a9 mojo::edk::(anonymous namespace)::ChannelPosix::OnFileCanReadWithoutBlocking() #26 0x00000397ea4c base::MessagePumpLibevent::OnLibeventNotification() #27 0x00000398e16d event_base_loop #28 0x00000397edd1 base::MessagePumpLibevent::Run() #29 0x0000038e2021 base::MessageLoop::Run() #30 0x0000039060e6 base::RunLoop::Run() #31 0x00000393373a base::Thread::Run() #32 0x000003022a24 content::BrowserProcessSubThread::IOThreadRun() #33 0x00000302296f content::BrowserProcessSubThread::Run() #34 0x000003933a8f base::Thread::ThreadMain() #35 0x00000397cdef base::(anonymous namespace)::ThreadFunc() #36 0x7f32064fc184 start_thread #37 0x7f320204e03d clone
,
May 28 2018
It's failing when importScripts is called when importScripts is called after the worker is installed (and before shutting down). The initial SW launch for installation uses SWScriptLoaderFactory until it's installed, but the SWScriptLoaderFactory is still used for importScripts even after it's installed. When importScripts happen even after it's installed, the current implementation of SWScriptLoaderFactory routes the request to the network regardless of the script has been installed. That causes the crash.
,
May 30 2018
,
Jun 4 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d2da9b67f07e1a336062c38ff8240fec14073ff4 commit d2da9b67f07e1a336062c38ff8240fec14073ff4 Author: Makoto Shimazu <shimazu@chromium.org> Date: Mon Jun 04 09:47:29 2018 NetS13nSW: check the strorage when imported scripts after installation Scripts for service workers are loaded by using ServiceWorkerScriptLoaderFactory when it's launched for installation. However, even after installation is completed, SWScriptLoaderFactory can be used for importScripts() since ServiceWorkerInstalledScriptsManager isn't created for installation. This CL is to serve scripts imported after the install event from storage when they are installed during installation state. The WPT test is import-scripts-updated-flag.https.html. To make it pass, we need to fix how to check the storage (this CL) and also need to use right URLLoader for network (crrev.com/c/1075926). Bug: 846237 Change-Id: Ic85ed99f9126e96e6a71eeca14a6cff10c1ceca4 Reviewed-on: https://chromium-review.googlesource.com/1074988 Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#564038} [modify] https://crrev.com/d2da9b67f07e1a336062c38ff8240fec14073ff4/content/browser/service_worker/service_worker_script_loader_factory.cc [modify] https://crrev.com/d2da9b67f07e1a336062c38ff8240fec14073ff4/content/browser/service_worker/service_worker_script_loader_factory.h
,
Jun 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8de7421f9d286c8cbc1fc3f404e7158f541aca70 commit 8de7421f9d286c8cbc1fc3f404e7158f541aca70 Author: Makoto Shimazu <shimazu@chromium.org> Date: Wed Jun 06 22:19:35 2018 NetS13nSW: Get URLLoaderFactory from ResourceMessageFilter When NetworkService is off, URLLoader should not be used when the network request is coming from the renderer. This CL is to use URLLoaderFactoryImpl, which internally routes requests to ResourceDispatcherHost, for ServiceWorkerScriptLoaderFactory. Bug: 846237 Change-Id: Ie656f55c22bcd27a7564cdb68bc448ca24e7176e Reviewed-on: https://chromium-review.googlesource.com/1075926 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Ćukasz Anforowicz <lukasza@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#565058} [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/browser/loader/cross_site_document_blocking_browsertest.cc [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/browser/loader/resource_dispatcher_host_impl.cc [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/browser/renderer_host/render_process_host_impl.cc [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/browser/renderer_host/render_process_host_impl.h [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/browser/service_worker/embedded_worker_instance.cc [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/browser/service_worker/service_worker_navigation_loader_unittest.cc [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/public/browser/render_process_host.h [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/public/test/mock_render_process_host.cc [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/content/public/test/mock_render_process_host.h [modify] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/8de7421f9d286c8cbc1fc3f404e7158f541aca70/third_party/WebKit/LayoutTests/virtual/service-worker-servicification/http/tests/serviceworker/register-error-messages-expected.txt
,
Jun 7 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by shimazu@google.com
, May 24 2018