-
Fergal Daly authored
This is a reland of 2cda8338 Test is Flaky on Mac, so relanding with Mac disabled. Original change's description: > Reland "[Paint Preview] Post task captured callback" > > This is a reland of c669ac6b > > This is the test only, the fix was landed in https://crrev.com/c/2598087 > > - the previous test did not reproduce the crash, this one has crash a > crash that matches the trace in the wild > https://ci.chromium.org/p/chromium/builders/try/linux-dcheck-off-rel/16863? > It differs from the previous test by > - calling SetNeedsReload (emulating Clank's autorefresh) > - navigating to another frame afterwards, triggering Unload > > - the previous test timed out on some builders. It's possible that > the callback was already called before the test's own RunlLoop > started, which would mean that the loop never exits. This is avoided > by recording whether it has run or not. > > Original change's description: > > [Paint Preview] Post task captured callback > > > > 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: Mehran Mahmoudi <mahmoudi@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#837649} > > Bug: 1146573, 1160608 > > > Cq-Include-Trybots: luci.chromium.try:linux-dcheck-off-rel > Change-Id: I3ef0a81bb4fa99e2f42c6278ba53931aa934793e > Cq-Do-Not-Cancel-Tryjobs: true > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2596697 > Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org> > Commit-Queue: Fergal Daly <fergal@chromium.org> > Auto-Submit: Fergal Daly <fergal@chromium.org> > Cr-Commit-Position: refs/heads/master@{#840497} Bug: 1146573 Bug: 1160608 Change-Id: Ib26af42633d55e49752623930ce63245b6f4482e Cq-Include-Trybots: luci.chromium.try:linux-dcheck-off-rel Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615724 Auto-Submit: Fergal Daly <fergal@chromium.org> Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org> Reviewed-by:
Calder Kitagawa <ckitagawa@chromium.org> Cr-Commit-Position: refs/heads/master@{#841489}
62a79f61