• Istiaque Ahmed's avatar
    [Extension] Correctly dispose worker's ScriptContext. · be7c3d70
    Istiaque Ahmed authored
    While disposing a worker script context on worker thread, its corresponding
    extension might have already vanished from RendererExtensionRegistry because
    of ExtensionMsg_Unload IPC. This means that detecting whether the
    script context had extension API bindings installed through
    ExtensionAPIEnabledForServiceWorkerScript() won't return correct state.
    
    This CL changes worker disposal to inspect ServiceWorkerData instead,
    which should be non null if extension bindings were installed in the
    worker script context.
    
    Bug: 1005541
    Test: Update{un,}packedExtension flakiness reduces locally, see crbug.com/984522
    Change-Id: Ib33148a81ebcc720cf26b754c26a520bb4e22b92
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815226
    Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org>
    Reviewed-by: default avatarDavid Bertoni <dbertoni@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#699964}
    be7c3d70
dispatcher.cc 60.6 KB