Reland "service worker: Simplify main resource "handler" & "interceptor" (3/3)"
This is a reland of f4b58578 The fix is to add an early return of null `handle_` in MaybeCreateSubresourceLoaderParams() which is a weak ptr. The comment for `handle_` explains that for workers it can be destroyed before the interceptor, because {Dedicated,Shared}WorkerHost can be destroyed during loading. Also change WorkerScriptLoader to early return when the host is already destroyed, to avoid unexpected behavior like going to network instead of the service worker when it should. Original change's description: > service worker: Simplify main resource "handler" & "interceptor" (3/3) > > Bug: 1138155 > Change-Id: Iafb12ae9de19e68e637e7fb990bb8439ec4df848 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2602307 > Reviewed-by: Asami Doi <asamidoi@chromium.org> > Commit-Queue: Matt Falkenhagen <falken@chromium.org> > Cr-Commit-Position: refs/heads/master@{#842305} Bug: 1138155 Change-Id: I0b76d1cc9f0365d4bb0f063e1b42e5cb96d6d11d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2623609Reviewed-by:Asami Doi <asamidoi@chromium.org> Commit-Queue: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#842430}
Showing
Please register or sign in to comment