Pass AccessControlStatus to WorkerOrWorkletScriptController::Evaluate
As part of the effort to deprecate kNotSharableCrossOrigin, stop using it in WorkerOrWorkletScriptController::Evaluate. There are three users: - worker toplevel scripts - importScripts - ScheduledAction Workers are origin-bound, so we can use kSharableCrossOrigin (the name is misleading, I will rename it, after all the refactoring is done). importScripts() always use "no-cors" mode, so we can calculate the AccessControlStatus by using SecurityOrigin::CanReadContent. I don't want to place the ad-hoc logic, but plumbing it to response type is hard because of LoadScriptFromInstalledScriptsManager. For ScheduledAction, I gave up removing kNotSharableCrossOrigin this time, as it seems consistent with Execute(LocalFrame*). I will remove the occurrence in a subsequent CL. Bug: 875153 Change-Id: I0d3c65e5fc152caed0265e7868e45ea9882ce487 Reviewed-on: https://chromium-review.googlesource.com/1180638 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:
Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#591255}
Showing
Please register or sign in to comment