• Makoto Shimazu's avatar
    COEP takes effect on a new service worker except for importScripts · 9e4b946a
    Makoto Shimazu authored
    Currently Cross-Origin-Embedder-Policy header is parsed in
    ServiceWorkerNewScriptLoader when launching a new service worker.
    However, the COEP in the response header for the main script isn't
    applied for the network loader created on launching a service worker
    because the network loader is created before starting to load the main
    script.
    This CL is to pause the service worker's script evaluation until the
    main script is loaded. Once the main script loaded, new subresource
    loaders are created by using the COEP value, and they are sent to the
    service worker.
    Imported scripts also need to refer to the new value, but the loaders
    are in different place (ServiceWorkerScriptLoaderFactory), so it'll be
    addressed in a later patch.
    
    Bug: 1039613
    Change-Id: Ice82eef86beec2f2f5c5e91f3aa136229f14c3ab
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029403
    Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
    Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
    Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
    Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
    Auto-Submit: Makoto Shimazu <shimazu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#748112}
    9e4b946a
PRESUBMIT.py 8.85 KB