Fix crash on suspend for chrome os
If RendererFreezer::SuspendImminent was called multiple times before it had a chance to report readiness, it would post multiple tasks to do so on the current message loop. However the callback to report readiness would be cleared after the first task ran and would cause a crash when the next task tried to run it. Fix this by not posting new tasks while a callback is pending and just update the callback instead. BUG=414396 Signed-off-by:Chirantan Ekbote <chirantan@chromium.org> Review URL: https://codereview.chromium.org/550093004 Cr-Commit-Position: refs/heads/master@{#294916}
Showing
Please register or sign in to comment