• ckitagawa's avatar
    [Paint Preview] Post task captured callback · c669ac6b
    ckitagawa authored
    This CL attempts to fix a bug where calling
    WebContents::DecrementCapturerCount in the callback passed to
    PaintPreviewClient can result in reloading a crashed render frame.
    This is problematic and crashes if it occurs inside RenderFrameDeleted
    and PaintPreviewClient::OnFinished is invoked. By posting the callback
    it should be invoked after RenderFrameDeleted cleanup is done resulting
    in DecrementCapturerCount no longer being called inside
    RenderFrameDeleted.
    
    Bug: 1146573
    Change-Id: Iccb612d89135e058d8fc06de018e7c95cd91657a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595247
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Mehran Mahmoudi <mahmoudi@chromium.org>
    Reviewed-by: default avatarMehran Mahmoudi <mahmoudi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#837649}
    c669ac6b
paint_preview_browsertest.cc 16.7 KB