diff options
author | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-25 01:55:17 +0000 |
---|---|---|
committer | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-25 01:55:17 +0000 |
commit | 4e69ec1031ae5a80d0d262e9f43d1af149a8dd42 (patch) | |
tree | e30a22c2d60264aa242cf2d21730cefcbb17b7ae /chrome_frame | |
parent | 25135cd08fc9f59ff48b5ccdde4ba0f327aeab02 (diff) | |
download | chromium_src-4e69ec1031ae5a80d0d262e9f43d1af149a8dd42.zip chromium_src-4e69ec1031ae5a80d0d262e9f43d1af149a8dd42.tar.gz chromium_src-4e69ec1031ae5a80d0d262e9f43d1af149a8dd42.tar.bz2 |
Revert 79352 - ChromeFrame would fail to load the page correctly if a manifest was specified in the html tag.
This would work the first time and fail on subsequent attempts. Basically the manifest specifies
portions of the website that is cached locally. In this case when there is a subsequent navigation
to the original URL the cached resource can be served out of the appcache which lives in chrome.
ChromeFrame expects the first url request from chrome to match that of the url which the user
navigated to. This url is served out of chrome'a app cache thus causing the pending url reques
checks to fail.
Fix is to validate the pending url request with the request received and stop the pending request
if there is no match. We just trace the fact and stop this request. A new request object is
created to handle the request received and life goes on.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=76439
BUG=76439
TEST=manually as described in the bug.
Review URL: http://codereview.chromium.org/6713112
TBR=ananta@chromium.org
Review URL: http://codereview.chromium.org/6741001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79361 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/urlmon_url_request.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index 12dbb66..652361c 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -851,7 +851,7 @@ void UrlmonUrlRequest::NotifyDelegateAndDie() { delegate_ = NULL; ReleaseBindings(); TerminateTransaction(); - if (delegate && !pending()) { + if (delegate) { net::URLRequestStatus result = status_.get_result(); delegate->OnResponseEnd(id(), result); } else { @@ -995,22 +995,22 @@ void UrlmonUrlRequestManager::StartRequest(int request_id, bool is_started = false; if (pending_request_) { if (pending_request_->url() != request_info.url) { - DLOG(INFO) << __FUNCTION__ - << "Received url request for url:" - << request_info.url - << ". Stopping pending url request for url:" - << pending_request_->url(); - pending_request_->Stop(); - pending_request_ = NULL; - } else { - new_request.swap(pending_request_); - is_started = true; - DVLOG(1) << __FUNCTION__ << new_request->me() - << " assigned id " << request_id; + DLOG(WARNING) << __FUNCTION__ + << "Received unexpected url request for url:" + << request_info.url + << ".Pending url request for url:" + << pending_request_->url() + << " was expected."; + net::URLRequestStatus result; + result.set_status(net::URLRequestStatus::FAILED); + OnResponseEnd(request_id, result); + return; } - } - - if (!is_started) { + new_request.swap(pending_request_); + is_started = true; + DVLOG(1) << __FUNCTION__ << new_request->me() + << " assigned id " << request_id; + } else { CComObject<UrlmonUrlRequest>* created_request = NULL; CComObject<UrlmonUrlRequest>::CreateInstance(&created_request); new_request = created_request; |