• falken@chromium.org's avatar
    Make ServiceWorker an ActiveDOMObject · 4f84aa88
    falken@chromium.org authored
    Before this patch, the ServiceWorker object returned by
    navigator.serviceWorker.register() could be garbage collected
    prematurely causing state change event handlers to never be invoked.
    This patch makes ServiceWorker an ActiveDOMObject and keeps it alive
    until either stop() is called on it (indicating detach of the parent
    document) or it reaches the terminal "deactivated" state (soon to be
    renamed "redundant").
    
    For future work, it may be possible to be more clever and allow the SW
    to die when it has no event handlers.
    
    BUG=383972
    
    Review URL: https://codereview.chromium.org/330173003
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@176197 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    4f84aa88
TestExpectations 78 KB