Support IsolatedCodeCache for service worker pass-through responses.
Previously code caching of scripts served from service workers was only supported if the Response was produced from cache_storage. If the service worker implemented a pass-through handler like: evt.respondWith(fetch(evt.request)) Then the v8 compiler could not store or load code cache for the script. With IsolatedCodeCache shipping it becomes much simpler to now support this feature. This CL enables support by: 1) Fetching the code cache for service worker controlled scripts. 2) Allowing the code cache to be used for pass-through responses. 3) Storing any code cache produced for pass-through responses. We still explicitly disable code cache for service worker handlers that produce either: a) Synthetic `new Response()` objects. b) Response objects produced by `fetch()` to a URL different from the original request URL. Bug: 917414 Change-Id: I4efdc852a27069d2937056af0133a986e745b2be Reviewed-on: https://chromium-review.googlesource.com/c/1394740Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Ben Kelly <wanderview@chromium.org> Cr-Commit-Position: refs/heads/master@{#621993}
Showing
Please register or sign in to comment