• Yury Semikhatsky's avatar
    Revert "[DevTools] Properly notify devtools agent host when service worker is destroyed" · c6d15649
    Yury Semikhatsky authored
    This reverts commit 1537d629.
    
    Reason for revert: potentially breaks gmail reloading when disabling offline mode with DevTools open.
    
    Bug: 1085150
    
    Original change's description:
    > [DevTools] Properly notify devtools agent host when service worker is destroyed
    > 
    > ServiceWorkerDevToolsAgentHost now stores thread-safe reference to
    > ServiceWorkerContextWrapper instead of ServiceWorkerContextCore that
    > could be deleted asynchronously on the service worker core thread.
    > 
    > WorkerDestroyed notification is now sent to the observers of
    > ServiceWorkerDevToolsManager iff the worker version is both stopped
    > and doomed. Each worker can be terminated (and restarted) multiple times
    > and will result in a sequence of targetCrashed/targetReloadedAfterCrash
    > events in the protocol but the instance of its
    > ServiceWorkerDevToolsAgentHost will survive restarts and all connected
    > sessions will be preserved.
    > 
    > It fixes the events generated in the protocol for service workers from
    > targetCreated, (detachedFromTarget, attachedToTarget, targetReloadedAfterCrash)* to
    > targetCreated, (targetCrashed/targetReloadedAfterCrash)*, targetDestroyed
    > and avoids inadvertent session terminations when workers are stopped and
    > also spurious targetReloadedAfterCrash events.
    > 
    > Bug: none
    > Change-Id: I1125604d08b7842f7f8d74751091193b9af2cb59
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2099590
    > Commit-Queue: Yury Semikhatsky <yurys@chromium.org>
    > Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
    > Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#750975}
    
    TBR=dgozman@chromium.org,horo@chromium.org,caseq@chromium.org,yurys@chromium.org,einbinder@chromium.org
    
    # Not skipping CQ checks because original CL landed > 1 day ago.
    
    Bug: none
    Change-Id: Ibba7ce840b8c8b73c32086d141005306591e21cc
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2213448Reviewed-by: default avatarYury Semikhatsky <yurys@chromium.org>
    Commit-Queue: Yury Semikhatsky <yurys@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#771365}
    c6d15649
target_auto_attacher.h 2.84 KB