Commit 8f7008ef authored by Miyoung Shin's avatar Miyoung Shin Committed by Chromium LUCI CQ

Fix WebViewClient#onPageCommitVisible callback not invoke

This CL keep a swap promise as active when DidNotSwap is called
with the commit fail to fix the problem that
WebViewClient#onPageCommitVisible callback is not invoked or
callbacks arrive at once.

This problem was introduced since the CL[1] converted
FrameMsg_VisualStateRequest to mojo because the CL missed the
migration from the original code[2] which was being ported.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2342532
[2] https://chromium.googlesource.com/chromium/src/+/c75c53f04b0207e654fd2f7f05e6b785988ea30e/content/renderer/frame_swap_message_queue.cc#124

Bug: 1148808
Change-Id: I935bee95332e775fd13fea15fedc856d34b37649
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2636094Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#844566}
parent e3cba902
...@@ -54,6 +54,8 @@ cc::SwapPromise::DidNotSwapAction QueueReportTimeSwapPromise::DidNotSwap( ...@@ -54,6 +54,8 @@ cc::SwapPromise::DidNotSwapAction QueueReportTimeSwapPromise::DidNotSwap(
std::move(drain_callback_).Run(source_frame_number_); std::move(drain_callback_).Run(source_frame_number_);
if (swap_callback_) if (swap_callback_)
std::move(swap_callback_).Run(); std::move(swap_callback_).Run();
} else if (reason == cc::SwapPromise::COMMIT_FAILS) {
return DidNotSwapAction::KEEP_ACTIVE;
} }
return DidNotSwapAction::BREAK_PROMISE; return DidNotSwapAction::BREAK_PROMISE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment