New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 835717 link

Starred by 6 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Task


Sign in to add a comment

Make classic script fetch for top-level worker script off-main-thread

Project Member Reported by nhiroki@chromium.org, Apr 23 2018

Issue description

In the current implementation, top-level worker script is fetched from the main thread via WorkerClassicScriptLoader and DocumentThreadableLoader (see DedicatedWorker::Start() for example). To avoid dependencies on the main thread, that should be done from the worker thread.

Random notes:
- I assumed that worker script fetch goes through the Blink's memory cache, but it turned out that it's initiated as a RawResource request and bypasses the memory cache. This means we can move worker script fetch to the worker thread without worrying about the memory cache that doesn't work on the worker thread.
- horo@ is now making importScripts() off-main-thread ( issue 706331 ). He found some barriers to do it that may also affect off-main-thread top-level worker script fetch:
https://bugs.chromium.org/p/chromium/issues/detail?id=706331#c21
 
Blockedon: 706331
Blocking: 538751
Summary: Make classic script fetch for top-level worker script off-main-thread (was: Make top-level worker script fetch off-main-thread)
Cc: falken@chromium.org
- This change may break association with service workers. Currently, SW's scope matches with the parent document's URL, not the dedicated worker's URL. This is achieved by using the document's network provider. We may need to do something for keeping the logic, or make the SW's scope match with dedicated worker's URL (issue 731604). If we do the latter, we might need S13nSW?? (+falken@)

- Currently, top-level worker script is asynchronously fetched because it's done on the main thread. After off-the-main-thread script fetch is enabled, we could synchronously fetch it like importScripts().
Labels: WorkerBacklog
Cc: nhiroki@chromium.org shimazu@chromium.org
 Issue 753350  has been merged into this issue.
Cc: -nhiroki@chromium.org
Labels: -Pri-3 Pri-2
Owner: nhiroki@chromium.org
Status: Started (was: Available)
Blockedon: 880027
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 30

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

commit ff16abbf2d397e516d0b95837166542212c964a9
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Oct 30 03:02:27 2018

Worker: Hard-code AccessControlStatus for classic script evaluation in WorkerGlobalScope

This is a cleanup CL. Before this CL, AccessControlStatus for classic worker
scripts are passed from each worker implementation to WorkerGlobalScope.
Actually, however, AccessControlStatus::kSharableCrossOrigin is always specified
because cross-origin workers are disallowed. For cleanup, this CL stops passing
AccessControlStatus and instead hard-codes it in WorkerGlobalScope.

Bug: 835717
Change-Id: I9af910c113f1d5f032e77f48f54e1bc74153808b
Reviewed-on: https://chromium-review.googlesource.com/c/1304279
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603755}
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/core/workers/dedicated_worker_test.cc
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/core/workers/worker_global_scope.cc
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/core/workers/worker_global_scope.h
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/core/workers/worker_thread.cc
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/core/workers/worker_thread.h
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/core/workers/worker_thread_test_helper.h
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
[modify] https://crrev.com/ff16abbf2d397e516d0b95837166542212c964a9/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h

Blockedon: 900494
Project Member

Comment 11 by bugdroid1@chromium.org, Oct 31

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

commit 0bebf92d05406b5b318565a6cf007b00b790f163
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Oct 31 09:59:56 2018

Loader: Allow WorkerClassicScriptLoader to specify whether to impose strict MIME-type checks

This is a preparation CL for implementing off-the-main-thread worker top-level
classic script loading.

<Context of this change>

Currently, a top-level worker classic script is loaded on the main thread with a
parent document's context. In this case, MIME-type of the script is loosely
checked for historical reasons. For example, 'text/html' can be executed as a
script. On the other hand, once off-the-main-thread script loading is
implemented, a top-level worker classic script is loaded on a worker thread with
a worker's context and MIME-type of the script is strictly checked. This breaks
bunch of web-platform-tests.

To keep the backward compatibility, this CL allows WorkerClassicScriptLoader to
specify whether to impose strict MIME-type checks regardless of the execution
context type. A subsequent CL will disable it when off-the-main-thread top-level
worker classic script loading:
https://chromium-review.googlesource.com/c/chromium/src/+/1293432

<Possible cleanup in the future>

The flag to disable the strict MIME-type check should actually be determined
based on the 'fetch client' of script loading, so a subsequent cleanup CL may
move the flag from WorkerClassicScriptLoader to FetchClientSettingsObject.

Bug: 794548, 835717
Change-Id: I5cc8828966dd7619b30879f3d287505ad4b22fc0
Reviewed-on: https://chromium-review.googlesource.com/c/1293097
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604192}
[modify] https://crrev.com/0bebf92d05406b5b318565a6cf007b00b790f163/third_party/blink/renderer/core/loader/allowed_by_nosniff.cc
[modify] https://crrev.com/0bebf92d05406b5b318565a6cf007b00b790f163/third_party/blink/renderer/core/loader/allowed_by_nosniff.h
[modify] https://crrev.com/0bebf92d05406b5b318565a6cf007b00b790f163/third_party/blink/renderer/core/loader/allowed_by_nosniff_test.cc
[modify] https://crrev.com/0bebf92d05406b5b318565a6cf007b00b790f163/third_party/blink/renderer/core/script/classic_pending_script.cc
[modify] https://crrev.com/0bebf92d05406b5b318565a6cf007b00b790f163/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
[modify] https://crrev.com/0bebf92d05406b5b318565a6cf007b00b790f163/third_party/blink/renderer/core/workers/worker_classic_script_loader.h

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 1

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

commit 0636fe97aebac890f716f4720a73d980dacfb2f3
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Nov 01 03:15:55 2018

Worker: Implement off-the-main-thread top-level worker classic script loading behind the flag

This CL implements off-the-main-thread top-level worker classic script loading
for dedicated workers behind the flag. This flag is enabled only when virtual
tests run or the command line flag is explicitly specified.

According to the HTML spec[1], a top-level worker classic script should be
loaded with an outside fetch client settings object. However, current
implemention doesn't support the outside fetch client settings object for
off-the-main-thread script loading and then some tests are failing. This should
be fixed once ResourceFetcher/FetchContext separation is implemented (see
https://crbug.com/880027).

Subsequent CLs will run more tests (e.g., wpt/fetch, wpt/service-workers, and
wpt/content-security-policy) with the flag in order to reveal which features are
affected by lack of the implementation.

[1] https://html.spec.whatwg.org/multipage/workers.html#worker-processing-model

Bug: 835717
Change-Id: I73a2db48b9df44b87df395ce86c8beb8103def8f
Reviewed-on: https://chromium-review.googlesource.com/c/1293432
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604504}
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/WebKit/LayoutTests/virtual/off-main-thread-worker-script-fetch/external/wpt/workers/README.txt
[add] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/WebKit/LayoutTests/virtual/off-main-thread-worker-script-fetch/fast/workers/README.txt
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/dedicated_worker.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/dedicated_worker_test.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/dedicated_worker_thread.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/dedicated_worker_thread.h
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/worker_classic_script_loader.h
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/worker_global_scope.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/worker_global_scope.h
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/worker_thread.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/core/workers/worker_thread.h
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
[modify] https://crrev.com/0636fe97aebac890f716f4720a73d980dacfb2f3/third_party/blink/renderer/platform/runtime_enabled_features.json5

Blocking: 882467
Project Member

Comment 14 by bugdroid1@chromium.org, Nov 9

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

commit bcc307a6074152b3ce6010bb1058b3caa788f4de
Author: Hiroshige Hayashizaki <hiroshige@chromium.org>
Date: Fri Nov 09 07:09:56 2018

Update TestExpectations for virtual/off-main-thread-worker-script-fetch

Already fixed by https://chromium-review.googlesource.com/1287208.

Bug: 655458,  685303 , 835717
Change-Id: Id6df7f593db95846375c77918ede9ffcff6316e6
Reviewed-on: https://chromium-review.googlesource.com/c/1328705
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606755}
[modify] https://crrev.com/bcc307a6074152b3ce6010bb1058b3caa788f4de/third_party/WebKit/LayoutTests/TestExpectations

Project Member

Comment 16 by bugdroid1@chromium.org, Nov 20

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

commit 6f1e2810ab8f2d368485771201f81952119e859a
Author: Hiroshige Hayashizaki <hiroshige@chromium.org>
Date: Tue Nov 20 17:04:52 2018

Revert "Add off-main-thread-worker-script-fetch/external/wpt/referrer-policy"

This reverts commit 98dc58ecdac5a3cc4273426e24a19fff081b24c8.

Reason for revert:  crbug.com/906964 

Original change's description:
> Add off-main-thread-worker-script-fetch/external/wpt/referrer-policy
> 
> Bug: 835717, 880027
> Change-Id: I074ea4b911132477853bf95be70a36b7d62c4f79
> Reviewed-on: https://chromium-review.googlesource.com/c/1330903
> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#609534}

TBR=hiroshige@chromium.org,nhiroki@chromium.org

Change-Id: Ic9c46e2efd39d774c3833aef324a654010f65bc2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 835717, 880027,  906964 
Reviewed-on: https://chromium-review.googlesource.com/c/1344257
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609732}
[modify] https://crrev.com/6f1e2810ab8f2d368485771201f81952119e859a/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/6f1e2810ab8f2d368485771201f81952119e859a/third_party/WebKit/LayoutTests/VirtualTestSuites
[delete] https://crrev.com/02c7f5d5693c6bb20ca28ab443c3eb7d5577ca18/third_party/WebKit/LayoutTests/virtual/off-main-thread-worker-script-fetch/external/wpt/referrer-policy/README.txt

Blocking: 906991
Project Member

Comment 18 by bugdroid1@chromium.org, Nov 27

Project Member

Comment 19 by bugdroid1@chromium.org, Nov 27

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

commit 4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Nov 27 18:09:42 2018

Worker: Add referrer policy tests for shared workers

I manually changed only following files:

 - external/wpt/referrer-policy/generic/common.js
 - external/wpt/referrer-policy/generic/referrer-policy-test-case.js
 - external/wpt/referrer-policy/generic/subresource/shared-worker.py
 - external/wpt/referrer-policy/generic/template/shared-worker.js.template
 - external/wpt/referrer-policy/spec.src.json
 - TestExpectations

Others were auto-generated.

Bug: 835717, 906959
Change-Id: Ib0a84710fe94ba0893d9609bb708a3f5e8fd4091
Reviewed-on: https://chromium-review.googlesource.com/c/1343582
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611192}
[modify] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/TestExpectations
[modify] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/generic/common.js
[modify] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/generic/referrer-policy-test-case.js
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/generic/subresource/shared-worker.py
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/generic/template/shared-worker.js.template
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/shared-worker/no-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/shared-worker/no-redirect/generic.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/no-referrer/meta-referrer/same-origin/http-http/shared-worker/no-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin/http-rp/same-origin/http-http/shared-worker/no-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin/http-rp/same-origin/http-http/shared-worker/no-redirect/generic.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/same-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/same-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/same-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/same-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/same-origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/same-origin-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/same-origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/same-origin-insecure.http.html
[modify] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/spec.src.json
[modify] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/spec_json.js
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/same-insecure.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin-when-cross-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/same-insecure.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin-when-cross-origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/same-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin-when-cross-origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/same-insecure.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/strict-origin/meta-referrer/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unsafe-url/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unsafe-url/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unsafe-url/http-rp/same-origin/http-http/shared-worker/no-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unsafe-url/http-rp/same-origin/http-http/shared-worker/no-redirect/generic.http.html.headers
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unsafe-url/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unsafe-url/meta-referrer/same-origin/http-http/shared-worker/no-redirect/generic.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unset-referrer-policy/http-rp/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unset-referrer-policy/meta-referrer/same-origin/http-http/shared-worker/keep-origin-redirect/insecure-protocol.http.html
[add] https://crrev.com/4e5628b8ab2bdb0a0ce360d0dd4f9eff94182ba8/third_party/blink/web_tests/external/wpt/referrer-policy/unset-referrer-policy/meta-referrer/same-origin/http-http/shared-worker/no-redirect/insecure-protocol.http.html

A quick question: does this also aim to make the SW main script loading off the main thread? Thanks!
leon.han@: Yes! We plan to implement OTMT script loading for dedicated workers, shared workers, and service workers in this order.
Project Member

Comment 22 by bugdroid1@chromium.org, Dec 4

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

commit 383a02508661863525ce7f68413a5fd664db6174
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Dec 04 05:10:38 2018

Worker: Clean up WebSharedWorkerImpl

For off-the-main-thread shared worker top-level script loading, this CL cleans
up startup sequence in WebSharedWorkerImpl.

Specifically, this CL...

- factors out WorkerClients creation and WorkerThread creation from
  ContinueOnScriptLoaderFinished() into CreateWorkerClients() and
  StartWorkerThread(),
- uses FetchClientSettingsObjectSnapshot as much as possible instead of directly
  asscessing Document in order to remove WorkerShadowPage later.

Change-Id: I9a9c864f6234c6bd5042fabcdbc3fd4f1cbacd7c
Bug: 835717
Reviewed-on: https://chromium-review.googlesource.com/c/1358110
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613422}
[modify] https://crrev.com/383a02508661863525ce7f68413a5fd664db6174/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc
[modify] https://crrev.com/383a02508661863525ce7f68413a5fd664db6174/third_party/blink/renderer/core/exported/web_shared_worker_impl.h

Project Member

Comment 23 by bugdroid1@chromium.org, Dec 5

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

commit 640e4fb6366560ce116a2d14ba1dfade6a56e7f0
Author: Hiroshige Hayashizaki <hiroshige@chromium.org>
Date: Wed Dec 05 04:38:37 2018

Switch top-level classic worker fetch to use outsideSettings ResourceFetcher

This CL
- Makes ThreadableLoader and WorkerClassicScriptLoader
  accept a ResourceFetcher argument, and
- Creates and passes outsideSettings in
  WorkerGlobalScope::ImportClassicScriptPausable().

This switches FetchClientSettingsObject used for off-the-main-thread
classic worker top-level script fetch, and fixes
virtual/omt-worker-fetch/external/wpt/referrer-policy
test failures.

Bug: 880027, 835717
Change-Id: I68b6c8025c88362b507fcf84e56571d0e7eea409
Reviewed-on: https://chromium-review.googlesource.com/c/1328565
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613867}
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/renderer/core/loader/threadable_loader.cc
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/renderer/core/loader/threadable_loader.h
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/renderer/core/workers/dedicated_worker.cc
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/renderer/core/workers/worker_classic_script_loader.h
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/renderer/core/workers/worker_global_scope.cc
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
[modify] https://crrev.com/640e4fb6366560ce116a2d14ba1dfade6a56e7f0/third_party/blink/web_tests/TestExpectations

Project Member

Comment 24 by bugdroid1@chromium.org, Dec 6

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

commit c1505ba885793b3337c504cf98149bb3c1d13316
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Dec 06 05:52:54 2018

Worker: Run http/tests/workers/ with off-the-main-thread top-level dedicated worker script fetch

Bug: 835717
Change-Id: Icde42b1dd837ca6110933b5cffc53864b7778a0d
Reviewed-on: https://chromium-review.googlesource.com/c/1364811
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614280}
[modify] https://crrev.com/c1505ba885793b3337c504cf98149bb3c1d13316/third_party/blink/web_tests/TestExpectations
[modify] https://crrev.com/c1505ba885793b3337c504cf98149bb3c1d13316/third_party/blink/web_tests/VirtualTestSuites
[add] https://crrev.com/c1505ba885793b3337c504cf98149bb3c1d13316/third_party/blink/web_tests/virtual/omt-worker-fetch/http/tests/workers/README.txt

Project Member

Comment 25 by bugdroid1@chromium.org, Today (16 hours ago)

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

commit 3db608a7ff8c71e0d4e4584645af1352b62a25e3
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Dec 13 08:23:14 2018

Worker: Add a new error reporting path for top-level worker script fetch

Before this CL, unhandled runtime exceptions on WorkerGlobalScope and errors on
off-the-main-thread top-level worker script fetch are reported to the parent
execution context in the same way. According to the HTML spec, this was wrong.

For unhandled runtime exceptions, if it's also unhandled by the parent execution
context, that should be propagated to the grandparent execution context and so
forth. See the "Runtime script errors" algorithm:
  https://html.spec.whatwg.org/multipage/workers.html#runtime-script-errors-2

On the other hand, for script fetch erros, that should just dispatch an error
event at the worker object in the parent execution context:
  "Queue a task to fire an event named error at worker."
  https://html.spec.whatwg.org/multipage/workers.html#worker-processing-model

This CL adds a new error reporting path for errors on top-level worker script
fetch (WorkerReportingProxy::DidFailToFetchClassicScript()). This change fixes
web_tests failures when off-the-main-thread worker script fetch is enabled. In
those tests, script fetch errors are treated as unhandled exceptions and the
test harness complains it.

Note that this change affects only off-the-main-thread worker script fetch.
On-the-main-thread worker script fetch correctly dispatches the error event
without the propagation before this change (see DedicatedWorker::OnFinished()).

Change-Id: I093dc024a817516b88d062bcefc978935320418d
Bug: 835717
Reviewed-on: https://chromium-review.googlesource.com/c/1370230
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616242}
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/dedicated_worker.cc
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/dedicated_worker.h
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/dedicated_worker_object_proxy.cc
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/dedicated_worker_object_proxy.h
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.cc
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.h
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/worker_global_scope.cc
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/worker_module_tree_client.cc
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/renderer/core/workers/worker_reporting_proxy.h
[modify] https://crrev.com/3db608a7ff8c71e0d4e4584645af1352b62a25e3/third_party/blink/web_tests/TestExpectations

Sign in to add a comment