Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DIP] Plumb DIP reporter into ServiceWorker
This CL ensures that CORP checks handled by ServiceWorkers and that fails due to DocumentIsolationPolicy are properly reported to an appropriate DocumentIsolationPolicyReporter. To do so, it creates a DocumentIsolationPolicy reporter in the EmbeddedWorkerInstance based on the DocumentIsolationPolicy passed to the worker. The DocumentIsolationPolicy reporter and COEP reporter are then connected to ReportingObservers in the renderer process that are bound when the WorkerGlobalScope is initialized. This CL updates how this is currently done for COEP reporter, so that it happens through the GlobalScopeCreationParams instead of the specific ServiceWorkerGlobalScope. This will allow to reuse it for COEP and DocumentIsolationPolicy reporters in DedicatedWorkers and SharedWorkers. This CL also fixes an issue where DocumentIsolationPolicy was not passed to the ServiceWorker and was not taken into account for CORP checks triggered by the ServiceWorker. The exception for using a non-Blink version of DocumentIsolationPolicy in the ServiceWorker's CrossOriginResourcePolicyChecker was approved in https://groups.google.com/a/chromium.org/g/platform-architecture-dev/c/kB9rcdFdIUE/m/IirIrk2nCwAJ. This CL is part of a chain of CLs implementing DocumentIsolationPolicy reporting: 1) Add DocumentIsolationPolicyReporter 2) Implement DocumentIsolationPolicyReporter 3) Pass the reporter to URLloaderFactory 4) Plumb DIP reporter into ServiceWorkers <- you are here 5) Add a DIP reporter to DedicatedWorker 6) Add a DIP reporter to SharedWorker 7) Plumb DIP reporter in CacheStorage Bug: 333029815 Change-Id: I9b3a873867f01c5200be31b50e02687aa30314e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088945 Reviewed-by: Mike West <[email protected]> Commit-Queue: Camille Lamy <[email protected]> Reviewed-by: Hiroki Nakagawa <[email protected]> Cr-Commit-Position: refs/heads/main@{#1410232}
- Loading branch information