commit | dff353380d01186786abe49f5d58c0065663cb02 | [log] [tgz] |
---|---|---|
author | Hiroki Nakagawa <nhiroki@chromium.org> | Mon May 20 01:30:25 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Mon May 20 01:30:25 2019 |
tree | cab27a85e98b1ef3d055c3c203b662a43196051e | |
parent | cb7a8cdc02e7e31fb4eaa74e09c43ca6e3e0bc4d [diff] |
Worker: Make sure to install features controlled by origin trial after OriginTrialContext::AddTokens() JavaScript's properties controlled by origin trials are installed for workers in WorkerOrWorkletScriptController::Initialize(). This is too early for shared/service workers with off-the-main-thread worker script fetch. This is because their origin trial tokens are served via worker script's response headers, and are applied to OriginTrialContext *after* WorkerOrWorkletScriptController::Initialize(). This CL separates WorkerOrWorkletScriptController::Initialize() into 2 parts: Initialize() to create and initialize the global object, and ReadyToEvaluate() to install the conditional features. Then, this makes sure to call ReadyToEvaluate() after the tokens are applied. This change fixes a following test with off-the-main-thread service worker script fetch: - virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/cookiestore-origin-trial-interfaces.html Change-Id: I024915b470600d6dc4835d7d3aef297da616da3e Bug: 945215 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614645 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Auto-Submit: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#661245}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .