Improve the timing of OnLoadEnd (fixes issue #3341)

Use WebContentsDelegate::DidFinishLoad instead of a custom Mojo message.
This fixes flaky OnLoadEnd behavior with NavigationTest.Order.
This commit is contained in:
Marshall Greenblatt
2022-08-25 18:17:51 -04:00
parent 5ec6e62656
commit 37aee4d3a0
12 changed files with 42 additions and 59 deletions

View File

@ -364,15 +364,6 @@ void CefFrameImpl::OnDidFinishLoad() {
blink::WebDocumentLoader* dl = frame_->GetDocumentLoader();
const int http_status_code = dl->GetWebResponse().HttpStatusCode();
SendToBrowserFrame(__FUNCTION__,
base::BindOnce(
[](const GURL& url, int http_status_code,
const BrowserFrameType& browser_frame) {
browser_frame->DidFinishFrameLoad(url,
http_status_code);
},
dl->GetUrl(), http_status_code));
CefRefPtr<CefApp> app = CefAppManager::Get()->GetApplication();
if (app) {
CefRefPtr<CefRenderProcessHandler> handler = app->GetRenderProcessHandler();