Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix isSecureContext for workers created from data urls in secure cont…
…exts Worker created from data urls in secure contexts should be considered as in secure contexts as well. Spec: https://html.spec.whatwg.org/multipage/webappapis.html#secure-contexts Discussions: w3c/webappsec-secure-contexts#69 Alternatives considered: - Make ExecutionContext::IsSecureContext virtual and provide a specialized WorkerGlobalScope. The problem is that it bypasses the UseCounter logging in [1] - Call security_origin.SetOpaqueOriginIsPotentiallyTrustworthy(true) at [2]. This makes IsPotentiallyTrustworthy() true for this specific security_origin. However, other places call IsPotentiallyTrustworthy() too so I am not sure whether this breaks other intended behaviors. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/execution_context/security_context.cc;l=124-126 [2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/workers/worker_global_scope.cc;l=137;bpv=1;bpt=1 Bug: 1325494 Change-Id: Id5c7c3bc61b320426249bde0e346bd1f5f0b33d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4377256 Commit-Queue: Jonathan Hao <phao@chromium.org> Reviewed-by: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/heads/main@{#1125248}
- Loading branch information