summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-07 22:36:10 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-07 22:36:10 +0000
commitdcea40cfb5c862b24a248560acf95230d9faae36 (patch)
tree24063691c35ef4ad32de3ce03b775089b3733762 /chrome_frame
parentfd0c6d2822422e6bc8d6534960b656272448de06 (diff)
downloadchromium_src-dcea40cfb5c862b24a248560acf95230d9faae36.zip
chromium_src-dcea40cfb5c862b24a248560acf95230d9faae36.tar.gz
chromium_src-dcea40cfb5c862b24a248560acf95230d9faae36.tar.bz2
Fix a DCHECK which fired in ChromeFrame which indicated that we had a pending request
which is created when we switch into ChromeFrame and the URL request received from Chrome was for a different URL. This scenario occurs when we receive requests from Chrome for the current page which is being navigated away from while a new document is coming up. Fix is to disallow these requests while we have a pending request. The other fix is in the ExternalTabContainer where a spurious DCHECK was being fired in the BeforeUnload code path. Fixes bug http://code.google.com/p/chromium/issues/detail?id=65295 BUG=65295 TEST=As described in the bug. Review URL: http://codereview.chromium.org/5632003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/urlmon_url_request.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index a72e3a2..74c5705 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -979,6 +979,18 @@ void UrlmonUrlRequestManager::StartRequest(int request_id,
scoped_refptr<UrlmonUrlRequest> new_request;
bool is_started = false;
if (pending_request_) {
+ if (pending_request_->url() != request_info.url) {
+ DVLOG(1) << __FUNCTION__
+ << "Received unexpected url request for url:"
+ << request_info.url
+ << ".Pending url request for url:"
+ << pending_request_->url()
+ << " was expected.";
+ URLRequestStatus result;
+ result.set_status(URLRequestStatus::FAILED);
+ OnResponseEnd(request_id, result);
+ return;
+ }
DCHECK_EQ(pending_request_->url(), request_info.url);
new_request.swap(pending_request_);
is_started = true;
@@ -1169,7 +1181,11 @@ void UrlmonUrlRequestManager::OnResponseEnd(int request_id,
DVLOG(1) << __FUNCTION__;
DCHECK(status.status() != URLRequestStatus::CANCELED);
RequestMap::size_type n = request_map_.erase(request_id);
- DCHECK_EQ(1u, n);
+ if (n != 1u) {
+ DVLOG(1) << __FUNCTION__
+ << " Failed to find request id:"
+ << request_id;
+ }
++calling_delegate_;
delegate_->OnResponseEnd(request_id, status);
--calling_delegate_;