diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 22:41:31 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-18 22:41:31 +0000 |
commit | 7d7560fbe774447e6a65807a3611df9854f645f9 (patch) | |
tree | 59cdfae132c4479ef697d893073a8b5b7ae41e38 /chrome | |
parent | b182ccb20dfae6a26745fcc3b7d626287f946a2a (diff) | |
download | chromium_src-7d7560fbe774447e6a65807a3611df9854f645f9.zip chromium_src-7d7560fbe774447e6a65807a3611df9854f645f9.tar.gz chromium_src-7d7560fbe774447e6a65807a3611df9854f645f9.tar.bz2 |
Fix a DCHECK in the IFrameTest.InEmptyFrame by removing it. The behavior is
correct, and the condition can be hit differently than assumed by the DCHECK.
BUG=3035
Review URL: http://codereview.chromium.org/15050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/iframe_uitest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/web_contents.cc | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/chrome/browser/iframe_uitest.cc b/chrome/browser/iframe_uitest.cc index 1c46b88..fb36a86 100644 --- a/chrome/browser/iframe_uitest.cc +++ b/chrome/browser/iframe_uitest.cc @@ -30,7 +30,7 @@ TEST_F(IFrameTest, Crash) { // http://crbug.com/3035 : Triggers a DCHECK in web_contents.cc. Need to // investigate. -TEST_F(IFrameTest, DISABLED_InEmptyFrame) { +TEST_F(IFrameTest, InEmptyFrame) { NavigateAndVerifyTitle(L"iframe_in_empty_frame.html", L"iframe test"); } diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index bf60d58f..7bee9a5 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -850,6 +850,8 @@ void WebContents::DidStopLoading(RenderViewHost* rvh, int32 page_id) { scoped_ptr<LoadNotificationDetails> details; if (controller()) { NavigationEntry* entry = controller()->GetActiveEntry(); + // An entry may not exist for a stop when loading an initial blank page or + // if an iframe injected by script into a blank page finishes loading. if (entry) { scoped_ptr<base::ProcessMetrics> metrics( base::ProcessMetrics::CreateProcessMetrics( @@ -863,11 +865,6 @@ void WebContents::DidStopLoading(RenderViewHost* rvh, int32 page_id) { elapsed, controller(), controller()->GetCurrentEntryIndex())); - } else { - DCHECK(page_id == -1) << - "When a controller exists a NavigationEntry should always be " - "available in OnMsgDidStopLoading unless we are loading the " - "initial blank page."; } } |