Commit 44fe6320 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Revert "CHECK that CommitNavigation/CommitFailedNavigation IPCs always commit."

This reverts commit 95f797d6.

Reason for revert:
It broke some tests in official builds, see bug.

Original change's description:
> CHECK that CommitNavigation/CommitFailedNavigation IPCs always commit.
> 
> Currently, state synchronization between the browser and the renderer
> process is complicated and buggy for cross-process navigations. The
> renderer process is responsible for processing the commit IPC and then
> reporting success back up to the browser process, which then updates its
> state. However, it's unclear if this can lead to races.
> 
> Instead, if it is possible to assume that one CommitNavigation() IPC
> from the browser always maps to one committed navigation in the
> renderer, the code can be simplified to remove multiphase navigation
> commits. This means the browser would be able to mark a provisional
> local frame as committed as soon as it sends a commit IPC to the
> renderer for that frame.
> 
> Bug: 999255
> Change-Id: I7d58293e6c2ec6ca0d09b614ae5a41340f4afd8e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775663
> Commit-Queue: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: danakj <danakj@chromium.org>
> Reviewed-by: Nasko Oskov <nasko@chromium.org>
> Reviewed-by: Camille Lamy <clamy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#705414}

TBR=danakj@chromium.org,dcheng@chromium.org,nasko@chromium.org,clamy@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 999255,1014903
Change-Id: I9b5429c66a47e1a180ba2ff82059fe596d7f0b79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874575Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708414}
parent 954e6514
This diff is collapsed.
......@@ -1749,26 +1749,6 @@ class CONTENT_EXPORT RenderFrameImpl
std::unique_ptr<blink::WebURLLoaderFactoryForTest>
web_url_loader_factory_override_for_test_;
// When the browser asks the renderer to commit a navigation, it should always
// result in a committed navigation reported via DidCommitProvisionalLoad().
// This is important because DidCommitProvisionalLoad() is responsible for
// swapping in the provisional local frame during a cross-process navigation.
// Since this involves updating state in both the browser process and the
// renderer process, this assert ensures that the state remains synchronized
// between the two processes.
//
// Note: there is one exception that can result in no commit happening.
// Committing a navigation runs unload handlers, which can detach |this|. In
// that case, it doesn't matter that the navigation never commits, since the
// logical node for |this| has been removed from the DOM.
enum class NavigationCommitState {
kNone,
kWillCommitFromIPC,
kDidCommitFromIPC,
};
class AssertNavigationCommits;
NavigationCommitState navigation_commit_state_ = NavigationCommitState::kNone;
base::WeakPtrFactory<RenderFrameImpl> weak_factory_{this};
DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
......
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