Commit ff995c3f authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Portals: Remove early return for predecessor not having a committed entry

We change this early return to a DCHECK as we are guaranteed to have a
committed navigation entry, since about:blank cannot host a portal.

Bug: 914108
Change-Id: I41f998711b6d7d2ec1163dc9ccbdb5f0edc63969
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2082906
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Commit-Queue: Lucas Gadani <lfg@chromium.org>
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Reviewed-by: default avatarLucas Gadani <lfg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746175}
parent 81ba7a1a
......@@ -271,16 +271,10 @@ void TakeHistoryForActivation(WebContentsImpl* activated_contents,
NavigationControllerImpl& predecessor_controller =
predecessor_contents->GetController();
DCHECK(predecessor_controller.GetLastCommittedEntry());
// Activation would have discarded any pending entry in the host contents.
DCHECK(!predecessor_controller.GetPendingEntry());
// If the predecessor has no committed entries (e.g. by using window.open()
// and then activating a portal from about:blank), there's nothing to do here.
// TODO(mcnee): This should also be disallowed.
if (!predecessor_controller.GetLastCommittedEntry()) {
return;
}
// TODO(mcnee): Determine how to deal with a transient entry.
if (predecessor_controller.GetTransientEntry() ||
activated_controller.GetTransientEntry()) {
......
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