• chirantan's avatar
    Fix crash on suspend for chrome os · 1a1fd180
    chirantan authored
    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: default avatarChirantan Ekbote <chirantan@chromium.org>
    
    Review URL: https://codereview.chromium.org/550093004
    
    Cr-Commit-Position: refs/heads/master@{#294916}
    1a1fd180
renderer_freezer.cc 2.99 KB