diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-10 14:09:37 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-10 14:09:37 +0000 |
commit | bbfa9a15797ba107dcae0f7fff85a7f12ffd26b9 (patch) | |
tree | ee15898939e4989b96c6419217696f63d7a5585b /chrome_frame/urlmon_url_request.cc | |
parent | e721ebe885b159f9b18047392be9a0f5834998fb (diff) | |
download | chromium_src-bbfa9a15797ba107dcae0f7fff85a7f12ffd26b9.zip chromium_src-bbfa9a15797ba107dcae0f7fff85a7f12ffd26b9.tar.gz chromium_src-bbfa9a15797ba107dcae0f7fff85a7f12ffd26b9.tar.bz2 |
Handle automation server crashes. When Chrome crashes, we now handle the case and support document refresh or reload.
When chrome crashes, we draw a poor man's sad tab (":-("), so that can clearly be improved.
Another thing is that if the chrome instance that crashed held several navigational entries, then that history is lost.
TEST=There are a couple of tests included, so run those (*TabCrash*) and also verify that when the chrome automation server is killed that we do the right thing. Also check info in bug report.
BUG=25839
Review URL: http://codereview.chromium.org/3061036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/urlmon_url_request.cc')
-rw-r--r-- | chrome_frame/urlmon_url_request.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index 47f34ac..08f44ff 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -184,7 +184,7 @@ void UrlmonUrlRequest::TerminateBind(TerminateBindCallback* callback) { size_t UrlmonUrlRequest::SendDataToDelegate(size_t bytes_to_read) { DCHECK_EQ(thread_, PlatformThread::CurrentId()); - DCHECK(id() != -1); + DCHECK_NE(id(), -1); DCHECK_GT(bytes_to_read, 0U); size_t bytes_copied = 0; if (delegate_) { @@ -220,7 +220,7 @@ size_t UrlmonUrlRequest::SendDataToDelegate(size_t bytes_to_read) { if (bytes_copied) { ++calling_delegate_; - DCHECK(id() != -1); + DCHECK_NE(id(), -1); delegate_->OnReadComplete(id(), read_data); --calling_delegate_; } @@ -375,7 +375,7 @@ STDMETHODIMP UrlmonUrlRequest::OnStopBinding(HRESULT result, LPCWSTR error) { // TRUE |TRUE => Something went wrong!! if (pending_data_) { - DCHECK(pending_read_size_ == 0); + DCHECK_EQ(pending_read_size_, 0UL); ReleaseBindings(); return S_OK; } @@ -619,7 +619,7 @@ STDMETHODIMP UrlmonUrlRequest::OnResponse(DWORD dwResponseCode, // Inform the delegate. headers_received_ = true; - DCHECK(id() != -1); + DCHECK_NE(id(), -1); delegate_->OnResponseStarted(id(), "", // mime_type raw_headers.c_str(), // headers @@ -908,8 +908,10 @@ void UrlmonUrlRequestManager::StartRequest(int request_id, DLOG(INFO) << __FUNCTION__ << " id: " << request_id; DCHECK_EQ(0, calling_delegate_); - if (stopping_) + if (stopping_) { + DLOG(WARNING) << __FUNCTION__ << " request not started (stopping)"; return; + } DCHECK(request_map_.find(request_id) == request_map_.end()); DCHECK(GURL(request_info.url).is_valid()); |