commit | 0bebf92d05406b5b318565a6cf007b00b790f163 | [log] [tgz] |
---|---|---|
author | Hiroki Nakagawa <nhiroki@chromium.org> | Wed Oct 31 09:59:56 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Oct 31 09:59:56 2018 |
tree | 4f7be33a0e3552041ba4ecee7f0dd596931f62b3 | |
parent | fa6d68be71982d854a6188aec35658c66e45dfbb [diff] |
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}
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 .