commit | 5aa265a985035752eba06465cd4aa44c151b4336 | [log] [tgz] |
---|---|---|
author | Kenichi Ishibashi <[email protected]> | Thu Feb 28 07:01:45 2019 |
committer | Commit Bot <[email protected]> | Thu Feb 28 07:01:45 2019 |
tree | 63cdd13f5d194a8a2458438ca82bb5686a7ca512 | |
parent | 7dcbebc04da8117b777182439caa46424c3ee2a0 [diff] [blame] |
service worker: off-main-thread script fetch This CL implements OMT service worker script fetch behind a runtime flag. When the flag is enabled, WebEmbeddedWorkerImpl fetches worker script on the worker thread using WorkerThread::ImportClassicScript(). Global scope initialization is delayed until script is fetched to support pausing and resuming worker for update check. See the following doc for detailed explanations and alternative approaches: https://docs.google.com/document/d/1VqVm-kLS0uOCiuSRYhk5iO-qrXc1Zfqj2SAO0fAXEgo/edit?usp=sharing Bug: 924043 Change-Id: I0d2656224c0ec00ff2630f48e21ad6331e03dd38 Reviewed-on: https://chromium-review.googlesource.com/c/1482101 Reviewed-by: Kinuko Yasuda <[email protected]> Reviewed-by: Hiroki Nakagawa <[email protected]> Reviewed-by: Matt Falkenhagen <[email protected]> Commit-Queue: Kenichi Ishibashi <[email protected]> Cr-Commit-Position: refs/heads/master@{#636357}
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc index 80009d72..f20b664 100644 --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc
@@ -70,6 +70,11 @@ "OffMainThreadDedicatedWorkerScriptFetch", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enable off-the-main-thread service worker script fetch. +// (https://crbug.com/924043) +const base::Feature kOffMainThreadServiceWorkerScriptFetch{ + "OffMainThreadServiceWorkerScriptFetch", base::FEATURE_DISABLED_BY_DEFAULT}; + // Enable off-the-main-thread shared worker script fetch. // (https://crbug.com/924041) const base::Feature kOffMainThreadSharedWorkerScriptFetch{