New issue
Advanced search Search tips

Issue 443374 link

Starred by 39 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocked on:
issue 723086

Blocking:
issue 706331



Sign in to add a comment

Web Worker network requests blocked by main thread in Chrome

Reported by matthew....@gmail.com, Dec 17 2014

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Initialize a web worker which periodically makes network requests (I've tested with XMLHttpRequests and WebSockets).
2. Block the main thread (eg with an infinite while loop, or a blocking dialog).

What is the expected behavior?
The background thread issues the XMLHttpRequests, even whilst the main thread is blocked.

What went wrong?
Although the background thread continues to make progress whilst the main thread is blocked, the network requests aren't issued. Concretely, the XMLHttpRequest objects are created, and code following their creation is executed, but the requests are not issued until the main thread is unblocked (I've confirmed this by looking at the logs in my test server).

I've attached sample files for the main thread and worker thread that illustrate the problem. These are contrived examples, but they illustrate the problem quite well. The blocking while loop could easily be replaced by other blocking code (eg a call to window.alert). I've also attached a summary of the relevant log messages. 

A separate issue here is that printing log messages from the background appears to also be blocked by the main thread. That seems reasonable though, and it's still clear from the logs that execution is not generally blocked in the background thread: it's just blocked for the XHRs.

Did this work before? N/A 

Chrome version: 38.0.2125.111  Channel: stable
OS Version: OS X 10.10.0
Flash Version: Shockwave Flash 15.0 r0
 
worker.js
533 bytes View Download
main.js
436 bytes View Download
log_summary.txt
257 bytes View Download

Comment 1 by mmenke@chromium.org, Dec 17 2014

Labels: -Cr-Internals-Network Cr-Blink-Workers
Labels: Needs-Feedback
matthew@, thanks for the issue.

Is it possible to verify the issue from QA end. If so, please provide a sample test to reproduce.
Labels: Cr-Blink-XHR Cr-Blink-Loader
Status: Available
Currently worker XHRs are processed in the main thread and hence blocking the main thread blocks them. Yes, it should not block them.

Comment 4 by kinuko@chromium.org, Jul 22 2015

Cc: ksakamoto@chromium.org toyoshim@chromium.org
The right one.

ksakamoto-san, toyoshim-san: this issue is semi-related to what we're talking about, i.e. 'main thread working on behalf of worker thread' issue.

Comment 5 by trusktr@gmail.com, Oct 8 2015

MessageChannel communication between workers is also blocked when the UI thread is blocked. Details here: http://forums.infamous.io/t/web-worker-performance-tests/21/16?u=joe

Communication between workers works fine in Firefox and IE, and is very very important for designing performant applications.

Please fix this as soon as possible. Thanks!

Comment 6 by tkent@chromium.org, Nov 27 2015

Labels: -Cr-Blink-XHR Cr-Blink-Network-XHR
Project Member

Comment 7 by sheriffbot@chromium.org, Nov 30 2016

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 8 by horo@chromium.org, Dec 9 2016

Cc: kenjibaheux@chromium.org horo@chromium.org
Components: Blink>ServiceWorker Blink>Network>FetchAPI
Adding "Blink>ServiceWorker" and "Blink>Network>FetchAPI".
This issues is super important for PWA sites, because fetch() in Service Workers is also blocked by the main thread.

Comment 9 by falken@chromium.org, Dec 19 2016

Status: Available (was: Untriaged)
This is on our radar.

Comment 10 by n...@fb.com, Jan 13 2017

Labels: DevRel-Facebook
Labels: OS-Android OS-Chrome OS-Linux OS-Windows
NextAction: 2017-01-23
Owner: horo@chromium.org
Status: Assigned (was: Available)
Here are the tentative key results for Q1:
 1. Estimate performance gain.
 2. Have some doc/plan about how to implement.
 3. Start committing code.

It's hard for us to gauge the priority of this performance issue vs. the remaining opportunity for SW startup latencies. Please consider sharing any data about impact.

Comment 12 by horo@chromium.org, Jan 25 2017

NextAction: 2017-01-30
Status: Started (was: Assigned)
I created a test page (https://goo.gl/GxUykR) using Google Map API JavaScript
file. This page shows a map with a marker. The ServiceWorker calls
"respondWith(fetch())" to passes the requests from the page through fetch API.

I measured the time between the navigation start and onLoad event with Nexus 4.
The average of 10 times results are:
 - No ServiceWorker                             : 2.89 sec
 - With ServiceWorker                           : 3.87 sec
 - With ServiceWorker in different process      : 3.11 sec
 - With ServiceWorker with a priority hack (*1) : 3.73 sec
    *1: This patch sets ServiceWorker initiated tasks highest priority.
        https://codereview.chromium.org/2649063002/

I created a patch (*2) to record detailed time breakdown of requests.
  *2: https://codereview.chromium.org/2654663004/
This is the result and the trace log:
  Result: https://goo.gl/qGDTuN  Trace: https://goo.gl/rYQ3UN

According to the result and the trace log:
 - The page load is actually delayed by the intensive main thread.
 - When the ServiceWorker is in a different process from the page's renderer
   process, the page load is not largely delayed.
 - We can see a slight improvement of the hack (*1). But it is not so big.
 - The FetchEvent is throttled in the browser process after receiving the
   request from the page before creating the ServiceWorkerURLRequestJob.

I will write some doc/plan about how to implement.

Comment 13 by horo@chromium.org, Jan 25 2017

Cc: tzik@chromium.org
Cc: kinuko@chromium.org
Cc: yhirano@chromium.org

Comment 16 by horo@chromium.org, Feb 10 2017

NextAction: 2017-02-17
There is another issue in FetchEvent.respondWith() that the data flow from the SW thread to the browser process is using BlobRegistry Stream which sends the IPC from the main thread.
I created another issue. ( crbug.com/690795 )

And I'm still investigating how to make it possible to call fetch() without going to the main thread.

Comment 17 by horo@chromium.org, Feb 16 2017

NextAction: 2017-02-24
I created a demo patch of "Mojo pipe respondWith" and "Off main thread fetch" (bypassing security checks), and measured the impact for time to onload event.
https://goo.gl/hrh3st
According to the result histogram, this can make the same-process SW as fast as the different-process SW.

I'm still investigating the design.
Blockedon: 695279

Comment 19 by horo@chromium.org, Mar 29 2017

NextAction: ----
I've been writing a proof-of-concept patch (https://crrev.com/2701753003).
And I've wrote a design doc (https://goo.gl/hgmQbP).
According to the try-bot results, it looks working well.

I'll start the implementation of patches to land.

Comment 20 by horo@chromium.org, Mar 29 2017

Blocking: 706331

Comment 21 by horo@chromium.org, Apr 5 2017

I uploaded the Mac binary with off-main-thread related patches.
https://drive.google.com/file/d/0B6skYAFVnosEWEdzbVdSZ0FXeFk/view?usp=sharing

Chromium base: refs/heads/master@{#462023} 6e42784f92a0b66a3eae584358ec4a8778bffa33
Patch 1: off-main-thread loading
https://codereview.chromium.org/2701753003/#ps1880001
Patch 2: Mojofy respondwith
https://codereview.chromium.org/2684533002/#ps240001

Project Member

Comment 22 by bugdroid1@chromium.org, Apr 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/61577bba5aca548c75a023abdc4d7c303d465a62

commit 61577bba5aca548c75a023abdc4d7c303d465a62
Author: horo <horo@chromium.org>
Date: Fri Apr 07 09:45:45 2017

Introduce OffMainThreadFetch feature.

This is the first patch for the off-main-thread fetch project.
https://goo.gl/hgmQbP

We will implement this under "--enable-features=OffMainThreadFetch" flag.

I will submit https://codereview.chromium.org/2799883002, when it will be ready to test in Chrome.

BUG= 443374 

Review-Url: https://codereview.chromium.org/2798083004
Cr-Commit-Position: refs/heads/master@{#462822}

[modify] https://crrev.com/61577bba5aca548c75a023abdc4d7c303d465a62/content/public/common/content_features.cc
[modify] https://crrev.com/61577bba5aca548c75a023abdc4d7c303d465a62/content/public/common/content_features.h

Comment 23 by horo@chromium.org, Apr 21 2017

 Issue 713738  has been merged into this issue.
Project Member

Comment 24 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e612058238bb3f549a917d55f94badf32377f85c

commit e612058238bb3f549a917d55f94badf32377f85c
Author: horo <horo@chromium.org>
Date: Wed Apr 26 01:48:59 2017

Implement the infrastructure of creating WorkerFetchContext in worker global scope.

This CL implements the infrastructure of creating WorkerFetchContext in worker
global scope of Dedicated Worker, Shared Worker and Service Worker.

1. WorkerFetchContext for Dedicated Worker
 1.1. DedicatedWorkerMessagingProxyProviderImpl::CreateWorkerMessagingProxy()
      calls RenderFrameImpl::CreateWorkerFetchContext() on the main thread.
 1.2. RenderFrameImpl::CreateWorkerFetchContext() gets the interface of
      WorkerURLLoaderFactoryProvider which is implemented in the browser process
      as WorkerURLLoaderFactoryProviderImpl, and creates a
      WorkerFetchContextImpl with the interface. WorkerFetchContextImpl keeps
      the interface as |provider_info_| until InitializeOnWorkerThread() is
      called on the worker thread.
 1.3. RenderFrameImpl::CreateWorkerFetchContext() copies the service worker
      state (ServiceWorkerProviderID and IsControlledByServiceWorker) of the
      frame to the WorkerFetchContextImpl.
 1.4. ProvideWorkerFetchContextToWorker() creates a WorkerFetchContextHolder
      which holds the WorkerFetchContextImpl and provides it to the
      WorkerClients using the Supplement mechanism.
 1.5. After the worker thread is created, the WorkerClients is reattached to
      the worker thread in the constructor of WorkerGlobalScope.
 1.6. WorkerGlobalScope::FetchContext() will be called to get the
      WorkerFetchContext in ThreadableLoader::Create() When fetch() is called in
      the worker thread. (This is not in this CL yet.)
 1.7. When WorkerGlobalScope::FetchContext() is called for the first time,
      WorkerFetchContext::Create() is called to get the WorkerFetchContextHolder
      from the WorkerClients and take the WorkerFetchContextImpl from it and
      create the WorkerFetchContext.
 1.8. The constructor of WorkerFetchContext calls WorkerFetchContextImpl::
      InitializeOnWorkerThread() which creates a ResourceDispatcher and calls
      WorkerURLLoaderFactoryProviderImpl::GetURLLoaderFactoryAndRegisterClient()
      in the browser process via mojo IPC with a request of URLLoaderFactory and
      the pointer (ServiceWorkerWorkerClient) of itself.
 1.9. WorkerURLLoaderFactoryProviderImpl::GetURLLoaderFactoryAndRegisterClient()
      binds the request of URLLoaderFactory to ResourceMessageFilter and calls
      ServiceWorkerContextWrapper::BindWorkerFetchContext() to bind the
      ServiceWorkerWorkerClient (the pointer to WorkerFetchContextImpl in the
      worker thread) with the parent frame's ServiceWorkerProviderHost. When the
      controller service worker of the ServiceWorkerProviderHost changed,
      WorkerFetchContextImpl::SetControllerServiceWorker() will be called via
      mojo. So WorkerFetchContextImpl::IsControlledByServiceWorker() can return
      the correct status.
 1.10. WorkerFetchContext::CreateURLLoader() calls WorkerFetchContextImpl::
       CreateURLLoader() which returns a new WebURLLoaderImpl with the pointer
       of URLLoaderFactory.

2. WorkerFetchContext for Shared Worker is created almost same as the Dedicated
   Worker. The only difference is that CreateWorkerFetchContext() is called in
   WebSharedWorkerImpl::OnScriptLoaderFinished().

3. WorkerFetchContext for Service Worker
 3.1. WebEmbeddedWorkerImpl::StartWorkerThread() calls
      ServiceWorkerContextClient::CreateServiceWorkerFetchContext() on the main
      thread.
 3.2. ServiceWorkerContextClient::CreateServiceWorkerFetchContext() gets the
      interface of WorkerURLLoaderFactoryProvider which is implemented in the
      browser process as WorkerURLLoaderFactoryProviderImpl, and creates a
      ServiceWorkerFetchContextImpl with the interface.
      ServiceWorkerFetchContextImpl keeps the interface as |provider_info_|
      until InitializeOnWorkerThread() is called on the worker thread.
 3.3. In WebEmbeddedWorkerImpl::StartWorkerThread(), the fetch context related
      information (ex: DataSaverEnabled) is set to the
      ServiceWorkerFetchContextImpl. (This is not in this CL yet.)
 3.4. Same as 1.4. ProvideWorkerFetchContextToWorker() creates a
      WorkerFetchContextHolder which holds the ServiceWorkerFetchContextImpl and
      provides it to the WorkerClientsusing the Supplement mechanism.
 3.5. Same as 1.5. the WorkerClients is reattached to the worker thread.
 3.6. Same as 1.6.
 3.7. Same as 1.7. When WorkerGlobalScope::FetchContext() is called for the
      first time, WorkerFetchContext::Create() is called to get the
      WorkerFetchContextHolder from the WorkerClients and take the
      ServiceWorkerFetchContextImpl from it and create the WorkerFetchContext.
 3.8. The constructor of WorkerFetchContext calls ServiceWorkerFetchContextImpl
      ::InitializeOnWorkerThread() which creates a ResourceDispatcher and calls
      WorkerURLLoaderFactoryProviderImpl::GetURLLoaderFactory() in the browser
      process via mojo IPC with a request of URLLoaderFactory.
 3.9. WorkerURLLoaderFactoryProviderImpl::GetURLLoaderFactory() binds the
      request of URLLoaderFactory to ResourceMessageFilter.
 3.10. WorkerFetchContext::CreateURLLoader() calls
       ServiceWorkerFetchContextImpl::CreateURLLoader() which returns a new
       WebURLLoaderImpl with the pointer of URLLoaderFactory.

BUG= 443374 

Review-Url: https://codereview.chromium.org/2804843005
Cr-Commit-Position: refs/heads/master@{#467200}

[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/browser/service_worker/service_worker_context_core.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/browser/service_worker/service_worker_context_core.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/child/resource_dispatcher.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/child/resource_dispatcher.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/child/runtime_features.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/common/BUILD.gn
[add] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/common/worker_url_loader_factory_provider.mojom
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/BUILD.gn
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/render_frame_impl.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/service_worker/service_worker_context_client.h
[add] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/service_worker/service_worker_fetch_context_impl.cc
[add] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/service_worker/service_worker_fetch_context_impl.h
[add] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/service_worker/worker_fetch_context_impl.cc
[add] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/shared_worker/embedded_shared_worker_stub.cc
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/content/renderer/shared_worker/embedded_shared_worker_stub.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/core/loader/BUILD.gn
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[add] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[add] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/public/platform/WebWorkerFetchContext.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/public/web/WebFrameClient.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/public/web/WebRuntimeFeatures.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/public/web/WebSharedWorkerClient.h
[modify] https://crrev.com/e612058238bb3f549a917d55f94badf32377f85c/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Project Member

Comment 25 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b18cecc5e51e5946b1c224bcbfd8fd71bd7c23d

commit 1b18cecc5e51e5946b1c224bcbfd8fd71bd7c23d
Author: horo <horo@chromium.org>
Date: Thu May 11 10:17:39 2017

Stop using Resource::ResourceCallback and make Resource have a TaskHandle

Resource::ResourceCallback was made to be static local by crrev.com/16365011.
It was intended to uses a single timer for all Resources.
But I don't think this optimization has an impact in the real world web.
To make the code simple, I'd like to remove the ResourceCallback and make the
Resource have a TaskHandle.

This change will make it easy to support off-main-thread fetch.

BUG= 443374 

Review-Url: https://codereview.chromium.org/2876453002
Cr-Commit-Position: refs/heads/master@{#470897}

[modify] https://crrev.com/1b18cecc5e51e5946b1c224bcbfd8fd71bd7c23d/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
[modify] https://crrev.com/1b18cecc5e51e5946b1c224bcbfd8fd71bd7c23d/third_party/WebKit/Source/platform/loader/fetch/Resource.h

Project Member

Comment 26 by bugdroid1@chromium.org, May 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/496a826dff5e0b9c4a61a3a355f273191ec90c4e

commit 496a826dff5e0b9c4a61a3a355f273191ec90c4e
Author: horo <horo@chromium.org>
Date: Mon May 15 01:50:11 2017

Partially implement WorkerFetchContext and WorkerThreadableLoadingContext and add virtual tests

BUG= 443374 

Review-Url: https://codereview.chromium.org/2880733002
Cr-Commit-Position: refs/heads/master@{#471649}

[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/workers/README.txt
[add] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/workers/block-mixed-content-base-https-expected.txt
[add] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/workers/block-mixed-content-nocors-base-https-expected.txt
[add] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/xmlhttprequest/workers/README.txt
[add] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/xmlhttprequest/workers/cross-origin-unsupported-url-expected.txt
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/core/loader/ThreadableLoader.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/core/loader/ThreadableLoadingContext.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/core/loader/ThreadableLoadingContext.h
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.cpp
[modify] https://crrev.com/496a826dff5e0b9c4a61a3a355f273191ec90c4e/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.h

Project Member

Comment 28 by bugdroid1@chromium.org, May 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/16ed410611fef5999f2cea2eeec4b6e2fafffc8a

commit 16ed410611fef5999f2cea2eeec4b6e2fafffc8a
Author: horo <horo@chromium.org>
Date: Mon May 15 10:02:39 2017

Use LoadingTaskRunner for cancel_timer_ of Resource class

BUG= 443374 

Review-Url: https://codereview.chromium.org/2878343002
Cr-Commit-Position: refs/heads/master@{#471716}

[modify] https://crrev.com/16ed410611fef5999f2cea2eeec4b6e2fafffc8a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp

Project Member

Comment 29 by bugdroid1@chromium.org, May 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01cef836909addbe68a475c633e6451e48ceab41

commit 01cef836909addbe68a475c633e6451e48ceab41
Author: horo <horo@chromium.org>
Date: Tue May 16 09:15:19 2017

Add more virtual tests for off-main-thread-fetch

BUG= 443374 

Review-Url: https://codereview.chromium.org/2882383002
Cr-Commit-Position: refs/heads/master@{#472047}

[modify] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/NeverFixTests
[modify] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/README.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-mixed-content-to-inscope.https-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-mixed-content-to-outscope.https-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/foreign-fetch-workers.https-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/chromium/README.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/inspector/service-workers/README.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/README.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-cache-worker-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-content-encoding-worker-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-cors-preflight-worker-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-redirect-worker-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-xhr-fetch-worker-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/cookies/README.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/cookies/third-party-cookie-blocking-worker-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/serviceworker/README.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/serviceworker/chromium.performance-timeline-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/workers/README.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/workers/resource-timing-allow-origin-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/workers/shared-worker-performance-timeline-expected.txt
[add] https://crrev.com/01cef836909addbe68a475c633e6451e48ceab41/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/workers/worker-performance-timeline-expected.txt

Project Member

Comment 31 by bugdroid1@chromium.org, May 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8691cc8301afdcbf13422ebce335b727bf7fa090

commit 8691cc8301afdcbf13422ebce335b727bf7fa090
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Tue May 16 14:30:55 2017

Update LeakExpectations for off-main-thread-fetch

BUG= 443374 , 722838 
TBR=falken

Review-Url: https://codereview.chromium.org/2889593002 .
Cr-Commit-Position: refs/heads/master@{#472098}

[modify] https://crrev.com/8691cc8301afdcbf13422ebce335b727bf7fa090/third_party/WebKit/LayoutTests/LeakExpectations

Project Member

Comment 32 by bugdroid1@chromium.org, May 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c5da4ae54598b8ebed887a52ee9b2763abb0047

commit 3c5da4ae54598b8ebed887a52ee9b2763abb0047
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Tue May 16 14:57:44 2017

Add non-utf8-header-name.php of off-main-thread-fetch virtual test to TestExpectations

BUG= 443374 , 722774 , 720511 
TBR=falken

Review-Url: https://codereview.chromium.org/2887753002 .
Cr-Commit-Position: refs/heads/master@{#472105}

[modify] https://crrev.com/3c5da4ae54598b8ebed887a52ee9b2763abb0047/third_party/WebKit/LayoutTests/TestExpectations

Project Member

Comment 33 by bugdroid1@chromium.org, May 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/137e05d0105abedb195dae64225b1f7b954da5e5

commit 137e05d0105abedb195dae64225b1f7b954da5e5
Author: horo <horo@chromium.org>
Date: Wed May 17 02:27:50 2017

DataSaver support for off-main-thread-fetch

This CL gets the DataSaver setting on the main thread and pass it to
WebWorkerFetchContext (WorkerFetchContextImpl, ServiceWorkerFetchContextImpl).
WorkerFetchContext::AddAdditionalRequestHeaders() will check the flag on the
worker thread and set "Save-Data" header if enabled.

BUG= 443374 , 722774 

Review-Url: https://codereview.chromium.org/2886663002
Cr-Commit-Position: refs/heads/master@{#472288}

[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/renderer/service_worker/service_worker_fetch_context_impl.cc
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/renderer/service_worker/service_worker_fetch_context_impl.h
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/chromium/data-saver-expected.txt
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/public/platform/WebWorkerFetchContext.h

Comment 34 by kbr@chromium.org, May 17 2017

Blockedon: 723086
Project Member

Comment 36 by bugdroid1@chromium.org, May 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e6bdad2acc6f745d504782ca9e3655d2570393e7

commit e6bdad2acc6f745d504782ca9e3655d2570393e7
Author: horo <horo@chromium.org>
Date: Thu May 18 03:52:28 2017

Implement WorkerFetchContext::AddResourceTiming() for off-main-thread-fetch

After this CL, performance.getEntries() will return the ResourceTiming
information of the requests which are fetched from the worker even if
off-main-thread-fetch is enabled (--enable-features=OffMainThreadFetch).

BUG= 443374 

Review-Url: https://codereview.chromium.org/2893533002
Cr-Commit-Position: refs/heads/master@{#472652}

[rename] https://crrev.com/e6bdad2acc6f745d504782ca9e3655d2570393e7/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/performance-timeline.https-expected.txt
[delete] https://crrev.com/1cb9864601dad078281ff870a23b308d2e88cb50/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-cache-worker-expected.txt
[delete] https://crrev.com/1cb9864601dad078281ff870a23b308d2e88cb50/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-content-encoding-worker-expected.txt
[delete] https://crrev.com/1cb9864601dad078281ff870a23b308d2e88cb50/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-cors-preflight-worker-expected.txt
[delete] https://crrev.com/1cb9864601dad078281ff870a23b308d2e88cb50/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-redirect-worker-expected.txt
[delete] https://crrev.com/1cb9864601dad078281ff870a23b308d2e88cb50/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/resource-timing-sizes-xhr-fetch-worker-expected.txt
[delete] https://crrev.com/1cb9864601dad078281ff870a23b308d2e88cb50/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/workers/resource-timing-allow-origin-expected.txt
[delete] https://crrev.com/1cb9864601dad078281ff870a23b308d2e88cb50/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/workers/shared-worker-performance-timeline-expected.txt
[delete] https://crrev.com/1cb9864601dad078281ff870a23b308d2e88cb50/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/workers/worker-performance-timeline-expected.txt
[modify] https://crrev.com/e6bdad2acc6f745d504782ca9e3655d2570393e7/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/e6bdad2acc6f745d504782ca9e3655d2570393e7/third_party/WebKit/Source/core/loader/WorkerFetchContext.h

Project Member

Comment 37 by bugdroid1@chromium.org, May 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d40bcabdcd220045cf57a0a2754298bbb818fc4

commit 8d40bcabdcd220045cf57a0a2754298bbb818fc4
Author: horo <horo@chromium.org>
Date: Thu May 18 07:33:42 2017

Pipe the FirstPartyForCookies to WorkerFetchContext for off-main-thread-fetch

BUG= 443374 

Review-Url: https://codereview.chromium.org/2891453005
Cr-Commit-Position: refs/heads/master@{#472721}

[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/content/renderer/service_worker/service_worker_fetch_context_impl.cc
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/content/renderer/service_worker/service_worker_fetch_context_impl.h
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/content/renderer/shared_worker/embedded_shared_worker_stub.cc
[delete] https://crrev.com/c09d13d92f688a3110968dbc2ecad29be8d24e80/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/cookies/third-party-cookie-blocking-worker-expected.txt
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/third_party/WebKit/Source/core/loader/ThreadableLoadingContext.cpp
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/8d40bcabdcd220045cf57a0a2754298bbb818fc4/third_party/WebKit/public/platform/WebWorkerFetchContext.h

Project Member

Comment 38 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c4e9325460f277a8db45b8b12d48efaddbdb841

commit 4c4e9325460f277a8db45b8b12d48efaddbdb841
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Fri May 19 04:31:26 2017

Set the requester context info to the requests for off-main-thread-fetch.

This CL pipes the IsOriginSecure state to WorkerFetchContext and set it to
the RequestExtraData at WorkerFetchContextImpl::WillSendRequest().
And WorkerFetchContext::PrepareRequest() sets the RequestorOrigin of requests.

After this cl, foreign fetch tests will pass.

BUG= 443374 
R=falken@chromium.org, kinuko@chromium.org

Review-Url: https://codereview.chromium.org/2890723002 .
Cr-Commit-Position: refs/heads/master@{#473086}

[modify] https://crrev.com/4c4e9325460f277a8db45b8b12d48efaddbdb841/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/4c4e9325460f277a8db45b8b12d48efaddbdb841/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/4c4e9325460f277a8db45b8b12d48efaddbdb841/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/4c4e9325460f277a8db45b8b12d48efaddbdb841/content/renderer/shared_worker/embedded_shared_worker_stub.cc
[modify] https://crrev.com/4c4e9325460f277a8db45b8b12d48efaddbdb841/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/18fc5e473594ff6bb062183835a60257def9a627/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/foreign-fetch-workers.https-expected.txt

Project Member

Comment 39 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c6d10d68d59de827337ca6d11e889d970e129c64

commit c6d10d68d59de827337ca6d11e889d970e129c64
Author: horo <horo@chromium.org>
Date: Fri May 19 05:27:28 2017

Send certificate errors from worker fetch context for off-main-thread-fetch.

BUG= 443374 

Review-Url: https://codereview.chromium.org/2888333002
Cr-Commit-Position: refs/heads/master@{#473096}

[modify] https://crrev.com/c6d10d68d59de827337ca6d11e889d970e129c64/chrome/browser/ssl/ssl_browser_tests.cc
[add] https://crrev.com/c6d10d68d59de827337ca6d11e889d970e129c64/chrome/test/data/ssl/unsafe_fetching_worker.js
[add] https://crrev.com/c6d10d68d59de827337ca6d11e889d970e129c64/chrome/test/data/ssl/unsafe_importing_worker.js
[delete] https://crrev.com/b0f1618f1c3f17a71ae3eb538bb326d329869309/chrome/test/data/ssl/unsafe_worker.js
[modify] https://crrev.com/c6d10d68d59de827337ca6d11e889d970e129c64/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/c6d10d68d59de827337ca6d11e889d970e129c64/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/c6d10d68d59de827337ca6d11e889d970e129c64/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/c6d10d68d59de827337ca6d11e889d970e129c64/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/c6d10d68d59de827337ca6d11e889d970e129c64/third_party/WebKit/public/platform/WebWorkerFetchContext.h

Project Member

Comment 41 by bugdroid1@chromium.org, May 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b77f4e721998b5fb72fd1039b14e926823527b8

commit 3b77f4e721998b5fb72fd1039b14e926823527b8
Author: horo <horo@chromium.org>
Date: Sat May 20 00:48:05 2017

Naively implement WorkerFetchContext::ShouldBlockFetchByMixedContentCheck()

We need more detailed check which is implemented in
MixedContentChecker::ShouldBlockFetch().
It take time to implement it for workers.
And returning false is a bit scary from the security point of view.

So I want to use MixedContentChecker::IsMixedContent() for a while.

BUG= 443374 

Review-Url: https://codereview.chromium.org/2895563002
Cr-Commit-Position: refs/heads/master@{#473397}

[delete] https://crrev.com/66169e7ebec215a59409823ab08f5210ce1fde24/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-mixed-content-to-inscope.https-expected.txt
[delete] https://crrev.com/66169e7ebec215a59409823ab08f5210ce1fde24/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-mixed-content-to-outscope.https-expected.txt
[delete] https://crrev.com/66169e7ebec215a59409823ab08f5210ce1fde24/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/workers/block-mixed-content-base-https-expected.txt
[delete] https://crrev.com/66169e7ebec215a59409823ab08f5210ce1fde24/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/workers/block-mixed-content-nocors-base-https-expected.txt
[modify] https://crrev.com/3b77f4e721998b5fb72fd1039b14e926823527b8/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp

Comment 42 by horo@chromium.org, May 20 2017

Memo: 201d49498b8685439a0ac143a86fd47ce5b0374c landed in 60.0.3105.0. So we can try chrome://flags/#enable-off-main-thread-fetch in Canary.
Project Member

Comment 43 by bugdroid1@chromium.org, May 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/116e20cf0aec28b3cd65fcb23a9b6cf1ed8f7606

commit 116e20cf0aec28b3cd65fcb23a9b6cf1ed8f7606
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Mon May 22 11:29:05 2017

Remove unsuitable TODO comments in WorkerFetchContext

BUG= 443374 
R=kinuko@chromium.org

Review-Url: https://codereview.chromium.org/2901503002 .
Cr-Commit-Position: refs/heads/master@{#473549}

[modify] https://crrev.com/116e20cf0aec28b3cd65fcb23a9b6cf1ed8f7606/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp

Project Member

Comment 45 by bugdroid1@chromium.org, Jun 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b2a16353681ed211c4e5e30ef9985088ea478fef

commit b2a16353681ed211c4e5e30ef9985088ea478fef
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Fri Jun 02 07:02:44 2017

Worker: Use per-global-scope task runner instead of the default task runner

Bug:  443374 
Change-Id: I665874f46c4b4adc829e6a487362b96894d8995e
Reviewed-on: https://chromium-review.googlesource.com/520529
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#476596}
[modify] https://crrev.com/b2a16353681ed211c4e5e30ef9985088ea478fef/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp

Blockedon: -695279
Project Member

Comment 47 by bugdroid1@chromium.org, Jul 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f61513654aecf07ba4fac786d17689750bf288f

commit 3f61513654aecf07ba4fac786d17689750bf288f
Author: horo <horo@chromium.org>
Date: Mon Jul 03 15:49:37 2017

Support DevTools for off-main-thread-fetch

After this CL, we can see the requests from workers in DevTool's network tab
even if chrome://flags/#enable-off-main-thread-fetch is enabled.

BUG= 443374 

Review-Url: https://codereview.chromium.org/2900613002
Cr-Commit-Position: refs/heads/master@{#484009}

[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/content/browser/devtools/protocol/network_handler.cc
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-datareceived.html
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/loader/FrameLoader.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/probe/CoreProbes.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/probe/CoreProbes.pidl
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/devtools/front_end/main/Main.js
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
[modify] https://crrev.com/3f61513654aecf07ba4fac786d17689750bf288f/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js

Project Member

Comment 48 by bugdroid1@chromium.org, Jul 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/778d74415617ab6d2924d6a6b140c1ccffc530e1

commit 778d74415617ab6d2924d6a6b140c1ccffc530e1
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Wed Jul 05 06:42:02 2017

Add worker related AppCache LayoutTests

Currently AppCache does work with dedicated workers and shared workers.
But according to the comment  https://crbug.com/39368#c23 , there are no LayoutTests.

To avoid introducing regressions on AppCache with workers by off-main-thread-fetch,
we need worker related AppCache LayoutTests.

Bug:  443374 , 39368 
Change-Id: Ic1e3ecbb92e0fc51263dcb1f493a7778ba70e3ae
Reviewed-on: https://chromium-review.googlesource.com/558758
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484198}
[add] https://crrev.com/778d74415617ab6d2924d6a6b140c1ccffc530e1/third_party/WebKit/LayoutTests/external/wpt/html/browsers/offline/appcache/workers/appcache-worker.html
[add] https://crrev.com/778d74415617ab6d2924d6a6b140c1ccffc530e1/third_party/WebKit/LayoutTests/external/wpt/html/browsers/offline/appcache/workers/resources/appcache-dedicated-worker-not-in-cache.js
[add] https://crrev.com/778d74415617ab6d2924d6a6b140c1ccffc530e1/third_party/WebKit/LayoutTests/external/wpt/html/browsers/offline/appcache/workers/resources/appcache-shared-worker-not-in-cache.js
[add] https://crrev.com/778d74415617ab6d2924d6a6b140c1ccffc530e1/third_party/WebKit/LayoutTests/external/wpt/html/browsers/offline/appcache/workers/resources/appcache-worker-data.py
[add] https://crrev.com/778d74415617ab6d2924d6a6b140c1ccffc530e1/third_party/WebKit/LayoutTests/external/wpt/html/browsers/offline/appcache/workers/resources/appcache-worker-import.py
[add] https://crrev.com/778d74415617ab6d2924d6a6b140c1ccffc530e1/third_party/WebKit/LayoutTests/external/wpt/html/browsers/offline/appcache/workers/resources/appcache-worker.manifest
[add] https://crrev.com/778d74415617ab6d2924d6a6b140c1ccffc530e1/third_party/WebKit/LayoutTests/external/wpt/html/browsers/offline/appcache/workers/resources/appcache-worker.py

Project Member

Comment 49 by bugdroid1@chromium.org, Jul 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88192782118553e9341132cece3a241c241a3b90

commit 88192782118553e9341132cece3a241c241a3b90
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Wed Jul 05 11:11:49 2017

Support AppCache with off-main-thread-fetch

Bug:  443374 
Change-Id: I8a20173a40ab1bb6493b15ec75e2e56cfd44bdda
Reviewed-on: https://chromium-review.googlesource.com/559029
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484241}
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/content/child/appcache/web_application_cache_host_impl.cc
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/content/child/appcache/web_application_cache_host_impl.h
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/content/public/common/appcache_info.h
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/html/browsers/offline/appcache/workers/README.txt
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.h
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/public/platform/WebApplicationCacheHost.h
[modify] https://crrev.com/88192782118553e9341132cece3a241c241a3b90/third_party/WebKit/public/platform/WebWorkerFetchContext.h

Project Member

Comment 50 by bugdroid1@chromium.org, Jul 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ecd6201eef445e450f2c32aec9841c37e8f3afbd

commit ecd6201eef445e450f2c32aec9841c37e8f3afbd
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Fri Jul 07 10:01:35 2017

Introduce BaseFetchContext::AllowScriptFromSource().

BaseFetchContext::GetSettings() and GetContentSettingsClient() are used only for
checking whether we can load the scripts. And we don't use WorkerFetchContext
for loading scripts in the worker thread.

So it is OK to only implement FrameFetchContext::AllowScriptFromSource().

Bug:  443374 
Change-Id: If9f6db44ca22174ecea56a119ddc038534bdc669
Reviewed-on: https://chromium-review.googlesource.com/563146
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484872}
[modify] https://crrev.com/ecd6201eef445e450f2c32aec9841c37e8f3afbd/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
[modify] https://crrev.com/ecd6201eef445e450f2c32aec9841c37e8f3afbd/third_party/WebKit/Source/core/loader/BaseFetchContext.h
[modify] https://crrev.com/ecd6201eef445e450f2c32aec9841c37e8f3afbd/third_party/WebKit/Source/core/loader/BaseFetchContextTest.cpp
[modify] https://crrev.com/ecd6201eef445e450f2c32aec9841c37e8f3afbd/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/ecd6201eef445e450f2c32aec9841c37e8f3afbd/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/ecd6201eef445e450f2c32aec9841c37e8f3afbd/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/ecd6201eef445e450f2c32aec9841c37e8f3afbd/third_party/WebKit/Source/core/loader/WorkerFetchContext.h

Project Member

Comment 51 by bugdroid1@chromium.org, Jul 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7f802839b64584e44ba8bae7fb4734ae8f684f67

commit 7f802839b64584e44ba8bae7fb4734ae8f684f67
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Mon Jul 10 06:40:19 2017

Support SubresourceFilter on Dedicated Worker for off-main-thread-fetch

This CL introduces WebDocumentSubresourceFilter::Builder class.

SubresourceFilterAgent::WillCreateWorkerFetchContext() creates the builder
object and set to the WebWorkerFetchContext on the main thread.

WebWorkerFetchContext::TakeSubresourceFilter() is called by the constructor of
WorkerFetchContext on the worker thread to creates a WebDocumentSubresourceFilter
using the builder object.

Note: This CL adds SubresourceFilter supports only for Dedicated Workers with
off-main-thread-fetch optimization. Currently SubresourceFilter is not supported
in Shared Workers and Service Workers regardless of the off-main-thread-fetch
optimization. See  crbug.com/739597#c2 

Bug:  443374 , 739597 
Change-Id: I5719f3b9de33a3e552a3271304e0d530e9c48cc8
Reviewed-on: https://chromium-review.googlesource.com/561263
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485196}
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/chrome/browser/subresource_filter/subresource_filter_browsertest.cc
[add] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/chrome/test/data/subresource_filter/worker_fetch.html
[add] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/chrome/test/data/subresource_filter/worker_fetch.js
[add] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/chrome/test/data/subresource_filter/worker_fetch_data.txt
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/components/subresource_filter/content/common/ruleset_dealer.cc
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/components/subresource_filter/content/common/ruleset_dealer.h
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/components/subresource_filter/content/renderer/subresource_filter_agent.cc
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/components/subresource_filter/content/renderer/subresource_filter_agent.h
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.cc
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.h
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/content/public/renderer/render_frame_observer.h
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/third_party/WebKit/Source/core/exported/WebDataSourceImpl.cpp
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/third_party/WebKit/Source/core/loader/SubresourceFilter.cpp
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/third_party/WebKit/Source/core/loader/SubresourceFilter.h
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/third_party/WebKit/Source/core/loader/WorkerFetchContext.h
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/third_party/WebKit/public/platform/WebDocumentSubresourceFilter.h
[modify] https://crrev.com/7f802839b64584e44ba8bae7fb4734ae8f684f67/third_party/WebKit/public/platform/WebWorkerFetchContext.h

Project Member

Comment 52 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4643d99c7790a75d8ac2369981cd32771ce0305

commit d4643d99c7790a75d8ac2369981cd32771ce0305
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Fri Jul 14 07:46:45 2017

Set WorkerSettings of ServiceWorkerGlobalScope.

I'm planing to add MixedContentChecking related settings to
WorkerSettings for off-main-thread-fetch.
But WorkerSettings is not set correctly in ServiceWorkerGlobalScope.
So this CL just adds SetWorkerSettings() in
ServiceWorkerGlobalScope::Create().

BUG= 607575 ,  443374 

Change-Id: I0e32bb84ce316b7125bfe11facfe5182095ae63f
Reviewed-on: https://chromium-review.googlesource.com/571207
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486701}
[modify] https://crrev.com/d4643d99c7790a75d8ac2369981cd32771ce0305/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Labels: -Needs-Feedback
Project Member

Comment 54 by bugdroid1@chromium.org, Jul 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a

commit 6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Tue Jul 25 07:10:48 2017

Add LayoutTest for MixedContentChecker::LogToConsoleAboutFetch() in dedicated workers

There are several LayoutTests under http/tests/security/mixedContent/ which
check the behavior of Mixed Content in pages.

I'm trying to implement WorkerFetchContext::ShouldBlockFetchByMixedContentCheck()
for off-main-thread-fetch without changing the existing behavior.

But unfortunately we don't have LayoutTests of Mixed Content for fetch API in
workers. So this CL adds LayoutTests for it before implementing it.

The -expected.txt files under virtual/off-main-thread-fetch/ in this CL don't
have CONSOLE logs of Mixed Content. But this is not the actual expected
behavior. When we will implement ShouldBlockFetchByMixedContentCheck() correctly
we should print the CONSOLE logs of Mixed Content same as the non-virtual tests.

And also, the result of "allowed" test under virtual/off-main-thread-fetch
should be "Result: LOADED".

I have another CL which adds browser_tests which involve the use action of
allowing insecure content that is not available in LayoutTests.
https://chromium-review.googlesource.com/c/576602/

Bug:  443374 
Change-Id: I4dd1e6e12b51d478e68e6bb74c9beb9edb2c99e6
Reviewed-on: https://chromium-review.googlesource.com/577984
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489246}
[modify] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-allowed.https-expected.txt
[add] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-allowed.https.html
[add] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-blocked.https-expected.txt
[add] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-blocked.https.html
[add] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/insecure-fetch-in-dedicated-worker.js
[add] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/mixedContent/README.txt
[add] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-allowed.https-expected.txt
[add] https://crrev.com/6f09a9e6732c4d2ab12b8d5fe44bf40099fc0c4a/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-blocked.https-expected.txt

Project Member

Comment 55 by bugdroid1@chromium.org, Jul 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e116714a24409d7cd663717730ceb92b5e09569

commit 5e116714a24409d7cd663717730ceb92b5e09569
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Tue Jul 25 15:16:31 2017

Add SSLUIWorkerFetchTest for MixedContent check for workers

I'm trying to implement WorkerFetchContext::ShouldBlockFetchByMixedContentCheck()
for off-main-thread-fetch without changing the existing behavior.
But unfortunately we don't have tests for MixedContent checking in workers.
So this CL adds browser tests for it before implementing it.

Bug:  443374 
Change-Id: I9657958022d298ea0313500f18688106a9e863c1
Reviewed-on: https://chromium-review.googlesource.com/576602
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489304}
[modify] https://crrev.com/5e116714a24409d7cd663717730ceb92b5e09569/chrome/browser/ssl/ssl_browser_tests.cc
[delete] https://crrev.com/a6d6e0b7f8d49e8536023efc89bee0d395e826b6/chrome/test/data/ssl/imported.js
[delete] https://crrev.com/a6d6e0b7f8d49e8536023efc89bee0d395e826b6/chrome/test/data/ssl/unsafe_fetching_worker.js
[delete] https://crrev.com/a6d6e0b7f8d49e8536023efc89bee0d395e826b6/chrome/test/data/ssl/unsafe_importing_worker.js

Project Member

Comment 56 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/536e80cdeedf98547f5561b1de5a90c11ee0dc65

commit 536e80cdeedf98547f5561b1de5a90c11ee0dc65
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Fri Jul 28 01:57:13 2017

Fix inspector/service-workers/user-agent-override.html for off-main-thread-fetch virtual test by setting experiment flag

Bug:  443374 
Change-Id: Ibc1201d66a29709a0e5b1f95ca5a2bbe08f40b4a
Reviewed-on: https://chromium-review.googlesource.com/558891
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490200}
[modify] https://crrev.com/536e80cdeedf98547f5561b1de5a90c11ee0dc65/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/536e80cdeedf98547f5561b1de5a90c11ee0dc65/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/user-agent-override.html

Project Member

Comment 57 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b552f4163f3a123ec977d34c12383c7b052b9386

commit b552f4163f3a123ec977d34c12383c7b052b9386
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Fri Jul 28 02:40:09 2017

Implement WorkerFetchContext::ShouldBlockFetchByMixedContentCheck() for off-main-thread-fetch.

When off-main-thread-featch is enabled, currently all mixed content requests are
blocked by WorkerFetchContext::ShouldBlockFetchByMixedContentCheck(). But Chrome
doesn't show the error message of "This page is trying to load scripts from
unauthenticated sources" in the omnibox.

Chrome should show the message. After the user clicks "load unsafe scripts",
Chrome should load the mixed content and shows the red "Not secure" indicator
in the omnibox.

And also there is a problem that the mixed content blocking logic in the workers
doesn't reflect the settings such as AllowRunningOfInsecureContent and
StrictlyBlockBlockableMixedContent.

This CL fix these problems by implementing ShouldBlockFetchByMixedContentCheck()
of WorkerFetchContext in the same way as FrameFetchContext. And the IPC messages
such as ChromeViewHostMsg_ContentBlocked and FrameHostMsg_DidRunInsecureContent
will be sent from the worker thread to show the messages in the omnibox.

These behaviors are tested by SSLUIWorkerFetchTest and the layout tests of
insecure-fetch-on-dedicated-worker-{allowed/blocked}.https.html

Bug:  443374 
Change-Id: I8843b3a8ca4c6048ee73633dc15ea43ace2cab0a
Reviewed-on: https://chromium-review.googlesource.com/566748
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490221}
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/chrome/browser/ssl/ssl_browser_tests.cc
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/chrome/renderer/content_settings_observer.h
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/chrome/renderer/worker_content_settings_client.cc
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/chrome/renderer/worker_content_settings_client.h
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/content/renderer/service_worker/worker_fetch_context_impl.cc
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/content/renderer/service_worker/worker_fetch_context_impl.h
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-allowed.https-expected.txt
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-blocked.https-expected.txt
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/Source/core/loader/MixedContentChecker.cpp
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/Source/core/loader/MixedContentChecker.h
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/Source/core/workers/WorkerContentSettingsClient.cpp
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/Source/core/workers/WorkerContentSettingsClient.h
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/Source/core/workers/WorkerSettings.cpp
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/Source/core/workers/WorkerSettings.h
[modify] https://crrev.com/b552f4163f3a123ec977d34c12383c7b052b9386/third_party/WebKit/public/platform/WebWorkerFetchContext.h

Project Member

Comment 58 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3dfa867459ab260ac8596b40a9fdddf637345aaf

commit 3dfa867459ab260ac8596b40a9fdddf637345aaf
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Fri Jul 28 06:12:16 2017

Add DevTools LayoutTest for fetching in workers

Bug:  443374 
Change-Id: I9124634dd3d32d389dec6ff7ca51823aa1e17bb6
Reviewed-on: https://chromium-review.googlesource.com/588729
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490296}
[modify] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/SlowTests
[modify] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/network-test.js
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-worker-fetch-blocked-expected.txt
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-worker-fetch-blocked.html
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-worker-fetch-expected.txt
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-worker-fetch.html
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/network/resources/fetch-worker.js
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/network-fetch-worker.js
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-network-fetch-blocked-expected.txt
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-network-fetch-blocked.html
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-network-fetch-expected.txt
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-network-fetch.html
[modify] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-test.js
[add] https://crrev.com/3dfa867459ab260ac8596b40a9fdddf637345aaf/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/inspector/network/README.txt

Project Member

Comment 59 by bugdroid1@chromium.org, Aug 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/480ee07d45c475e351d4de1bd5c4f0ac34217dd5

commit 480ee07d45c475e351d4de1bd5c4f0ac34217dd5
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Tue Aug 01 01:04:18 2017

Use std::atomic_ulong for CreateUniqueIdentifier()

We will use CreateUniqueIdentifier() from worker threads when off-main-thread-fetch is enabled.
So g_unique_identifier must be atomic.

Bug:  443374 
Change-Id: I766f466c250a90a8e2e61c8ac5535d3144a909b6
Reviewed-on: https://chromium-review.googlesource.com/593467
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490829}
[modify] https://crrev.com/480ee07d45c475e351d4de1bd5c4f0ac34217dd5/third_party/WebKit/Source/platform/loader/fetch/UniqueIdentifier.cpp

The CLs above have introduced flakes on Win7 (dbg) in these tests

SSLUIWorkerFetchTest.MixedContentSubFrame
SSLUIWorkerFetchTest.MixedContentSettings
SSLUIWorkerFetchTest.MixedContentSettingsWithBlockingCSP

See https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29?numbuilds=25.

I disable these tests on Windows dbg.

Example error message:
[ RUN      ] SSLUIWorkerFetchTest.MixedContentSubFrame/2
[5444:3880:0801/034139.276:WARNING:chrome_browser_main_win.cc(483)] Command line too long for RegisterApplicationRestart:  --brave-new-test-launcher --cfi-diag=0 --gtest_also_run_disabled_tests --gtest_filter=SSLUIWorkerFetchTest.MixedContentSubFrame/2 --single_process --test-launcher-bot-mode --test-launcher-summary-output="e:\b\swarm_slave\w\ion0e1id\output.json" --user-data-dir="C:\Users\CHROME~2\AppData\Local\Temp\scoped_dir5940_30951\d5940_31634" --disable-offline-auto-reload --enable-features=OffMainThreadFetch --no-first-run --no-default-browser-check --enable-logging=stderr --safebrowsing-disable-auto-update --disable-default-apps --wm-window-animations-disabled --disable-component-update --test-type=browser --force-color-profile=srgb --disable-zero-browsers-open-for-tests --ipc-connection-timeout=45 --allow-file-access-from-files --dom-automation --log-gpu-control-list-decisions --disable-backgrounding-occluded-windows --disable-gl-drawing-for-tests --override-use-software-gl-for-tests --force-color-profile=srgb --disable-features=NetworkPrediction --flag-switches-begin --flag-switches-end --restore-last-session about:blank
[4780:5316:0801/034139.966:ERROR:direct_composition_surface_win.cc(1073)] Failing to detect HDR, couldn't retrieve D3D11 device from ANGLE.
[4780:5316:0801/034140.027:INFO:media_foundation_video_encode_accelerator_win.cc(335)] Windows versions earlier than 8 are not supported.
[5064:2720:0801/034144.992:ERROR:render_process_impl.cc(176)] WebFrame LEAKED 1 TIMES
[5444:3004:0801/034145.107:ERROR:process_win.cc(139)] Unable to terminate process: Access is denied. (0x5)
[5444:3880:0801/034145.563:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This request has been blocked; the content must be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)
[5444:3880:0801/034147.100:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This request has been blocked; the content must be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)
[5444:4312:0801/034150.076:WARNING:embedded_test_server.cc(219)] Request not handled. Returning 404: /favicon.ico
[4504:5140:0801/034150.133:ERROR:render_process_impl.cc(176)] WebFrame LEAKED 3 TIMES
[5444:3004:0801/034150.445:ERROR:process_win.cc(139)] Unable to terminate process: Access is denied. (0x5)
[3228:3936:0801/034151.915:ERROR:render_process_impl.cc(176)] WebFrame LEAKED 1 TIMES
[5444:3004:0801/034152.002:ERROR:process_win.cc(139)] Unable to terminate process: Access is denied. (0x5)
[5444:3880:0801/034152.278:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This request has been blocked; the content must be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)
[5444:3880:0801/034152.844:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This request has been blocked; the content must be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)
[5284:3796:0801/034201.037:ERROR:render_process_impl.cc(176)] WebFrame LEAKED 1 TIMES
[5444:3004:0801/034201.135:ERROR:process_win.cc(139)] Unable to terminate process: Access is denied. (0x5)
[5444:3880:0801/034201.888:WARNING:web_contents_impl.cc(3862)] https://127.0.0.1:53712/ ran insecure content from http://example.com:53713/worker_test_data.txt
[5444:3880:0801/034201.918:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This content should also be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)
[5444:3880:0801/034203.543:WARNING:web_contents_impl.cc(3862)] https://127.0.0.1:53712/ ran insecure content from http://example.com:53713/worker_test_data.txt
[5444:3880:0801/034203.552:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This content should also be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)
[6044:4136:0801/034212.290:ERROR:render_process_impl.cc(176)] WebFrame LEAKED 1 TIMES
[5444:3004:0801/034212.613:ERROR:process_win.cc(139)] Unable to terminate process: Access is denied. (0x5)
[5444:3880:0801/034213.115:WARNING:web_contents_impl.cc(3862)] https://127.0.0.1:53712/ ran insecure content from http://example.com:53713/worker_test_data.txt
[5444:3880:0801/034213.142:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This content should also be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)
[5444:3880:0801/034214.560:WARNING:web_contents_impl.cc(3862)] https://127.0.0.1:53712/ ran insecure content from http://example.com:53713/worker_test_data.txt
[5444:3880:0801/034214.573:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This content should also be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)
[5708:2328:0801/034217.365:ERROR:render_process_impl.cc(176)] WebFrame LEAKED 3 TIMES
[5444:3004:0801/034217.460:ERROR:process_win.cc(139)] Unable to terminate process: Access is denied. (0x5)
[5444:3880:0801/034221.977:INFO:CONSOLE(1)] "Mixed Content: The page at 'https://127.0.0.1:53712/worker.js' was loaded over HTTPS, but requested an insecure resource 'http://example.com:53713/worker_test_data.txt'. This request has been blocked; the content must be served over HTTPS.", source: https://127.0.0.1:53712/worker.js (1)

Project Member

Comment 61 by bugdroid1@chromium.org, Aug 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e823b738b75733f463df731c2cb944b040ac1105

commit e823b738b75733f463df731c2cb944b040ac1105
Author: Jan Krcal <jkrcal@chromium.org>
Date: Tue Aug 01 13:53:18 2017

[Sheriff] Disable flaky SSLUIWorkerFetchTest.MixedContent* tests on Win.

The tests cause a lot of flakes on Windows 7 dbg buildbot.

TBR=horo@chromium.org, jkrcal@chromium.org, adithyas@chromium.org

Bug:  443374 
Change-Id: Id1145fcb274fc39b7672782ceb45224be0580daa
Reviewed-on: https://chromium-review.googlesource.com/595688
Reviewed-by: Jan Krcal <jkrcal@chromium.org>
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490976}
[modify] https://crrev.com/e823b738b75733f463df731c2cb944b040ac1105/chrome/browser/ssl/ssl_browser_tests.cc

Project Member

Comment 62 by bugdroid1@chromium.org, Aug 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13381c2141a9ae318318e2666a1d49b4a932c5a5

commit 13381c2141a9ae318318e2666a1d49b4a932c5a5
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Wed Aug 02 15:39:46 2017

Remove TODO comment in WorkerFetchContext.h

WorkerFetchContext implements all virtual methods of BaseFetchContext now.

Bug:  443374 
Change-Id: Ib8071cd74963c0fff5298a05d0d70a0728aace29
Reviewed-on: https://chromium-review.googlesource.com/597558
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491382}
[modify] https://crrev.com/13381c2141a9ae318318e2666a1d49b4a932c5a5/third_party/WebKit/Source/core/loader/WorkerFetchContext.h

Project Member

Comment 63 by bugdroid1@chromium.org, Aug 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f429b926ce4e42f8daee380d644fa7e843d2d3e3

commit f429b926ce4e42f8daee380d644fa7e843d2d3e3
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Wed Aug 02 23:54:06 2017

Update fieldtrial_testing_config.json for OffMainThreadFetch

Bug:  443374 
Change-Id: I001c3981e17430f8786eec2a7d475c0c994e2f5e
Reviewed-on: https://chromium-review.googlesource.com/597573
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491557}
[modify] https://crrev.com/f429b926ce4e42f8daee380d644fa7e843d2d3e3/testing/variations/fieldtrial_testing_config.json

Project Member

Comment 64 by bugdroid1@chromium.org, Aug 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ae8e4ee9cc4171beadcb571238e5bcb341824245

commit ae8e4ee9cc4171beadcb571238e5bcb341824245
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Wed Aug 02 23:58:10 2017

[DevTools] Enable network capability in worker unconditionally

We are planning to start the field trial experiment of
off-main-thread-fetch optimization.

But in the current implementation, web developers need to enable
'Network in workers' experiment of DevTools to show the network requests
from workers in DevTools if the optimization is enabled in their Chrome.
It is very troublesome for them while debugging PWA.

To avoid this problem, this CL enables the network capability in worker
unconditionally.

Bug:  443374 
Change-Id: I5ed24996cd0ff30a5bd22ce1067f653a5c68ae9b
Reviewed-on: https://chromium-review.googlesource.com/595294
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491559}
[modify] https://crrev.com/ae8e4ee9cc4171beadcb571238e5bcb341824245/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-worker-fetch-blocked.html
[modify] https://crrev.com/ae8e4ee9cc4171beadcb571238e5bcb341824245/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-worker-fetch.html
[modify] https://crrev.com/ae8e4ee9cc4171beadcb571238e5bcb341824245/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-network-fetch-blocked.html
[modify] https://crrev.com/ae8e4ee9cc4171beadcb571238e5bcb341824245/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-worker-network-fetch.html
[modify] https://crrev.com/ae8e4ee9cc4171beadcb571238e5bcb341824245/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/user-agent-override.html
[modify] https://crrev.com/ae8e4ee9cc4171beadcb571238e5bcb341824245/third_party/WebKit/Source/devtools/front_end/main/Main.js
[modify] https://crrev.com/ae8e4ee9cc4171beadcb571238e5bcb341824245/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js

Project Member

Comment 65 by bugdroid1@chromium.org, Aug 7 2017

Project Member

Comment 66 by bugdroid1@chromium.org, Aug 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d629de326110e81a67317312b794ddec5a077d29

commit d629de326110e81a67317312b794ddec5a077d29
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Thu Aug 17 07:19:20 2017

Enable OffMainThreadFetch by default

We did the field trial experiment in Dev/Canary 10 days.
And we haven't received related crashes.
So we decided to enable this feature by default.

Bug:752857,  443374 

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I223d52e69ad826297ea2359b6506e2a62b4b6e18
Reviewed-on: https://chromium-review.googlesource.com/567845
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495097}
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/content/public/common/content_features.cc
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/LeakExpectations
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/NeverFixTests
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/SlowTests
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/external/wpt/fetch/api/cors/cors-preflight-referrer.any.worker-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/performance-timeline.https-expected.txt
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-allowed.https-expected.txt
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-blocked.https-expected.txt
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/usecounter-fetch.html
[modify] https://crrev.com/d629de326110e81a67317312b794ddec5a077d29/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/workers/cross-origin-unsupported-url-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/interfaces-sw.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/interfaces-window.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/registration-updateviacache.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/acid3-expected.png
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/location-replace-crossdomain-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/object-embedding-svg-delayed-size-negotiation-2-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/object-embedding-svg-delayed-size-negotiation-expected.png
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/slow-loading-image-in-pattern-expected.png
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/linux/virtual/off-main-thread-fetch/http/tests/misc/slow-loading-image-in-pattern-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/mac/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/interfaces-sw.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/mac/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/interfaces-window.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/mac/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/registration-updateviacache.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/mac/virtual/off-main-thread-fetch/http/tests/misc/location-replace-crossdomain-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/mac/virtual/off-main-thread-fetch/http/tests/misc/object-embedding-svg-delayed-size-negotiation-2-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/mac/virtual/off-main-thread-fetch/http/tests/misc/slow-loading-image-in-pattern-expected.png
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/mac/virtual/off-main-thread-fetch/http/tests/misc/slow-loading-image-in-pattern-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/win/virtual/off-main-thread-fetch/http/tests/misc/location-replace-crossdomain-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/win/virtual/off-main-thread-fetch/http/tests/misc/object-embedding-svg-delayed-size-negotiation-2-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/win/virtual/off-main-thread-fetch/http/tests/misc/object-embedding-svg-delayed-size-negotiation-expected.png
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/win/virtual/off-main-thread-fetch/http/tests/misc/slow-loading-image-in-pattern-expected.png
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/platform/win/virtual/off-main-thread-fetch/http/tests/misc/slow-loading-image-in-pattern-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/html/browsers/offline/appcache/workers/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/performance-timeline.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/devtools/network/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/chromium/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/workers/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/inspector/network/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/inspector/service-workers/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/misc/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/cookies/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/mixedContent/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-allowed.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/security/mixedContent/insecure-fetch-on-dedicated-worker-blocked.https-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/serviceworker/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/serviceworker/chromium/usecounter-fetch-expected.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/workers/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/xmlhttprequest/workers/README.txt
[delete] https://crrev.com/b6a327f95df866fe289503af0318823957ef3c75/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/xmlhttprequest/workers/cross-origin-unsupported-url-expected.txt

Project Member

Comment 67 by bugdroid1@chromium.org, Aug 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/18a2e967ffb4b4933a09a4ea36176f4f070bdbac

commit 18a2e967ffb4b4933a09a4ea36176f4f070bdbac
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Mon Aug 21 05:49:09 2017

Add WPT tests for clients.claim() of Dedicated Worker and Shared Worker

We need these tests to cehck the behavior of WorkerFetchContextImpl::SetControllerServiceWorker()

Bug:  443374 
Change-Id: I6c8c7df133be41105c3394c16009cae0b110d8f9
Reviewed-on: https://chromium-review.googlesource.com/620469
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495876}
[add] https://crrev.com/18a2e967ffb4b4933a09a4ea36176f4f070bdbac/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/claim-shared-worker-fetch.https.html
[add] https://crrev.com/18a2e967ffb4b4933a09a4ea36176f4f070bdbac/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/claim-worker-fetch.https.html
[add] https://crrev.com/18a2e967ffb4b4933a09a4ea36176f4f070bdbac/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/claim-shared-worker-fetch-iframe.html
[add] https://crrev.com/18a2e967ffb4b4933a09a4ea36176f4f070bdbac/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/claim-shared-worker-fetch-worker.js
[add] https://crrev.com/18a2e967ffb4b4933a09a4ea36176f4f070bdbac/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/claim-worker-fetch-iframe.html
[add] https://crrev.com/18a2e967ffb4b4933a09a4ea36176f4f070bdbac/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/claim-worker-fetch-worker.js

Blockedon: 758419

Comment 69 by horo@chromium.org, Aug 25 2017

Labels: M-62
I have already enabled this feature by default by the commit ae8e4ee9cc4171beadcb571238e5bcb341824245 which landed in 62.0.3175.0.
And I stopped the A/B experiment in Dev/Canary.
So worker network requests are not blocked by main thread in M62 (Dev/Canary) now.

But I have still one patch to support CORS preflight cache in worker thread.
https://chromium-review.googlesource.com/c/chromium/src/+/627939
I will close this bug when I land this CL.

Comment 70 by horo@chromium.org, Aug 25 2017

Blockedon: -758419
Issue 758419 is not related to this bug.

Comment 72 by horo@chromium.org, Aug 29 2017

Status: Fixed (was: Started)
(ノ≧∀≦)ノ
Project Member

Comment 73 by bugdroid1@chromium.org, Jul 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bcdb2581f18308fc50961fee0d83a06c4c2ca766

commit bcdb2581f18308fc50961fee0d83a06c4c2ca766
Author: Matt Falkenhagen <falken@chromium.org>
Date: Tue Jul 10 06:56:33 2018

Move WorkerFetchContextImpl out of service_worker/ and rename to WebWorkerFetchContextImpl.

The class isn't used by service workers, so move it out of the service
worker directory.

Also rename it to WebWorkerFetchContextImpl. There is also
blink::WorkerFetchContext which is different to
blink::WebWorkerFetchContext. This class is a subclass of the
latter.

Refactoring only, no behavior change.

Bug:  443374 
Change-Id: I9ce7f37861b4f573979b4287da606e8c5f6c8ed3
Reviewed-on: https://chromium-review.googlesource.com/1128678
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573637}
[modify] https://crrev.com/bcdb2581f18308fc50961fee0d83a06c4c2ca766/content/common/service_worker/service_worker_provider.mojom
[modify] https://crrev.com/bcdb2581f18308fc50961fee0d83a06c4c2ca766/content/renderer/BUILD.gn
[rename] https://crrev.com/bcdb2581f18308fc50961fee0d83a06c4c2ca766/content/renderer/loader/web_worker_fetch_context_impl.cc
[rename] https://crrev.com/bcdb2581f18308fc50961fee0d83a06c4c2ca766/content/renderer/loader/web_worker_fetch_context_impl.h
[modify] https://crrev.com/bcdb2581f18308fc50961fee0d83a06c4c2ca766/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/bcdb2581f18308fc50961fee0d83a06c4c2ca766/content/renderer/service_worker/service_worker_provider_context.h
[modify] https://crrev.com/bcdb2581f18308fc50961fee0d83a06c4c2ca766/content/renderer/shared_worker/embedded_shared_worker_stub.cc
[modify] https://crrev.com/bcdb2581f18308fc50961fee0d83a06c4c2ca766/content/test/layouttest_support.cc

Sign in to add a comment