Commit c2308795 authored by Peter Kasting's avatar Peter Kasting

Turns out the CHECK I added for debugging can fail due to yet another bad side

effect of the prerenderer not working right.

Convert the CHECK into a conditional for now and leave an explanation of why it
can fail.

BUG=452299
TEST=none
TBR=vitalybuka

Review URL: https://codereview.chromium.org/876203002

Cr-Commit-Position: refs/heads/master@{#313190}
parent 550404a8
...@@ -99,9 +99,18 @@ void OmniboxNavigationObserver::Observe( ...@@ -99,9 +99,18 @@ void OmniboxNavigationObserver::Observe(
if (!InfoBarService::FromWebContents(web_contents)) if (!InfoBarService::FromWebContents(web_contents))
return; return;
CHECK_EQ(match_.destination_url, // Ignore navgiations to the wrong URL.
content::Details<content::NavigationEntry>( // This shouldn't actually happen, but right now it's possible because the
details)->GetVirtualURL()); // prerenderer doesn't properly notify us when it swaps in a prerendered page.
// Plus, the swap-in can trigger instant to kick off a new background
// prerender, which we _do_ get notified about. Once crbug.com/247848 is
// fixed, this conditional should be able to be replaced with a [D]CHECK;
// until then we ignore the incorrect navigation (and will be torn down
// without having received the correct notification).
if (match_.destination_url !=
content::Details<content::NavigationEntry>(details)->GetVirtualURL())
return;
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING, registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
content::NotificationService::AllSources()); content::NotificationService::AllSources());
if (fetcher_) { if (fetcher_) {
......
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