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 Review-Url: https://codereview.chromium.org/2317483005 Cr-Commit-Position: refs/heads/master@{#419951}
Showing
Please register or sign in to comment