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/+/2636094
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@igalia.com>
Cr-Commit-Position: refs/heads/master@{#844566}
diff --git a/third_party/blink/renderer/platform/widget/compositing/queue_report_time_swap_promise.cc b/third_party/blink/renderer/platform/widget/compositing/queue_report_time_swap_promise.cc
index 4609197..bc762f8 100644
--- a/third_party/blink/renderer/platform/widget/compositing/queue_report_time_swap_promise.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/queue_report_time_swap_promise.cc
@@ -54,6 +54,8 @@
       std::move(drain_callback_).Run(source_frame_number_);
     if (swap_callback_)
       std::move(swap_callback_).Run();
+  } else if (reason == cc::SwapPromise::COMMIT_FAILS) {
+    return DidNotSwapAction::KEEP_ACTIVE;
   }
   return DidNotSwapAction::BREAK_PROMISE;
 }