summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 00:35:21 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-25 00:35:21 +0000
commit54d350d0b24af8d1596a0f848a26fc51a60517a7 (patch)
tree94a126504fc657f5c574bedbbd5775cd684930df /chrome_frame
parent2650bd54d68e03e62b883eabf942b7404ab3cc19 (diff)
downloadchromium_src-54d350d0b24af8d1596a0f848a26fc51a60517a7.zip
chromium_src-54d350d0b24af8d1596a0f848a26fc51a60517a7.tar.gz
chromium_src-54d350d0b24af8d1596a0f848a26fc51a60517a7.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/urlmon_url_request.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index 652361c..12dbb66 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) {
+ if (delegate && !pending()) {
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(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;
+ 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;
}
- new_request.swap(pending_request_);
- is_started = true;
- DVLOG(1) << __FUNCTION__ << new_request->me()
- << " assigned id " << request_id;
- } else {
+ }
+
+ if (!is_started) {
CComObject<UrlmonUrlRequest>* created_request = NULL;
CComObject<UrlmonUrlRequest>::CreateInstance(&created_request);
new_request = created_request;