Fix crash in PauseContext/UnpauseContext.

It is possible that the frame becomes detached from the document
after dispatching the event. This is the only way the FrameScheduler
could be null. I previously checked it in SetLifecycleState in
and that seemed to decrease the number of crashes, but they still
seem to exist. These additional checks should cover those situations.


Change-Id: I59ad0e4f4e047f4548c72ad103691a260290626e
Commit-Queue: Dave Tapuska <>
Reviewed-by: Daniel Cheng <>
Cr-Commit-Position: refs/heads/master@{#695813}
1 file changed