Commit 6eadfbd4 authored by Rakina Zata Amni's avatar Rakina Zata Amni Committed by Chromium LUCI CQ

Add HasCommitted() check to MHVE::DidFinishNavigation

The RFH accessed in a DCHECK might be null if the navigation never reached the ReadyToCommitNavigation state. This CL updates the check added in https://chromium-review.googlesource.com/c/chromium/src/+/2569637 to be clearer.

Bug: 1133115
Change-Id: I9e4fcc6f239a6e69e855f7abd56b74a3b2cad0cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2574118Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834101}
parent 8a280610
......@@ -106,12 +106,13 @@ void MimeHandlerViewEmbedder::ReadyToCommitNavigation(
void MimeHandlerViewEmbedder::DidFinishNavigation(
content::NavigationHandle* handle) {
if (!render_frame_host_ ||
if (!handle->HasCommitted() ||
frame_tree_node_id_ != handle->GetFrameTreeNodeId()) {
return;
}
// We should've deleted the MimeHandlerViewEmbedder at this point if the frame
// is sandboxed.
DCHECK(render_frame_host_);
DCHECK(!render_frame_host_->IsSandboxed(
network::mojom::WebSandboxFlags::kPlugins));
}
......
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