• haraken's avatar
    Reland of Clear LifecycleObserver::m_context when... · 9c675cfd
    haraken authored
    Reland of Clear LifecycleObserver::m_context when LifecycleObserver::contextDestroyed gets called (patchset #1 id:1 of https://codereview.chromium.org/2365463004/ )
    
    Reason for revert:
    Relanding this CL because the fix to the original crash has been landed in https://codereview.chromium.org/2364693005/
    
    Original issue's description:
    > Revert of Clear LifecycleObserver::m_context when LifecycleObserver::contextDestroyed gets called (patchset #11 id:200001 of https://codereview.chromium.org/2317483005/ )
    >
    > Reason for revert:
    > Speculatively reverting for https://crbug.com/649272
    >
    > Original issue's description:
    > > Clear LifecycleObserver::m_context when LifecycleObserver::contextDestroyed gets called
    > >
    > > This CL clears LifecycleObserver::m_context when LifecycleObserver::contextDestroyed gets called.
    > > This means that LifecycleObserver::context() starts returning false after the context gets destroyed.
    > >
    > > The new behavior makes a lot of more sense, but the problem is that some existing code is assuming that
    > > LifecycleObserver::context() keeps returning the context even after the context gets destroyed.
    > > This CL fixed the problematic code to make all layout tests pass, but I'm not sure if I've updated all of the problematic code
    > > (because the coverage of the layout tests is not sufficient).
    > > However, the worst thing that can happen is that code that had been assuming that LifecycleObserver::context()
    > > returns a context even after the context gets destroyed will stop working (it may cause a null-deref crash).
    > > I think the risk is low.
    > >
    > > BUG=610176
    > >
    > > Committed: https://crrev.com/b729a998b05ec916731171d59de95e0aea31bbac
    > > Cr-Commit-Position: refs/heads/master@{#419951}
    >
    > TBR=haraken@chromium.org
    > # Not skipping CQ checks because original CL landed more than 1 days ago.
    > BUG=610176,649272
    > NOTRY=true
    >
    > Committed: https://crrev.com/04b1826356a37de2a322e7e6e0e80f07d05f210f
    > Cr-Commit-Position: refs/heads/master@{#420498}
    
    TBR=wfh@chromium.org,dcheng@chromium.org
    # Skipping CQ checks because original CL landed less than 1 days ago.
    NOPRESUBMIT=true
    NOTREECHECKS=true
    NOTRY=true
    BUG=610176,649272
    
    Review-Url: https://codereview.chromium.org/2367753002
    Cr-Commit-Position: refs/heads/master@{#420608}
    9c675cfd
xmlhttprequest-detached-mixedcontent-no-crash-expected.txt 593 Bytes