summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/buffered_resource_handler.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-17 19:18:45 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-17 19:18:45 +0000
commit443b84b2811a7810f2f25f0a89e59e952c991d37 (patch)
treebca7998298ac08634ee1bce329015194f3f3afbf /chrome/browser/renderer_host/buffered_resource_handler.cc
parent762ec957bb973eb4039061ff3d1d423090311835 (diff)
downloadchromium_src-443b84b2811a7810f2f25f0a89e59e952c991d37.zip
chromium_src-443b84b2811a7810f2f25f0a89e59e952c991d37.tar.gz
chromium_src-443b84b2811a7810f2f25f0a89e59e952c991d37.tar.bz2
Fix crash that could happen on shutdown if the ResourceMessageFilter tried to get the IO thread's message loop when it was going away. Do the same acrobatics as in BufferedResourceHandler by going to the UI thread first, and doing refcounting manually.
Also fix an issue I saw by inspection in BufferedResourceHandler, where Release should be called at the end of the function. BUG=19415 Review URL: http://codereview.chromium.org/171055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23563 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/buffered_resource_handler.cc')
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index 2903c89..1494f2a 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -425,14 +425,13 @@ void BufferedResourceHandler::NotifyPluginsLoaded(
}
void BufferedResourceHandler::OnPluginsLoaded() {
- Release();
wait_for_plugins_ = false;
- if (!request_)
- return;
-
- ResourceDispatcherHost::ExtraRequestInfo* info =
- ResourceDispatcherHost::ExtraInfoForRequest(request_);
- host_->PauseRequest(info->process_id, info->request_id, false);
- if (!CompleteResponseStarted(info->request_id, false))
- host_->CancelRequest(info->process_id, info->request_id, false);
+ if (request_) {
+ ResourceDispatcherHost::ExtraRequestInfo* info =
+ ResourceDispatcherHost::ExtraInfoForRequest(request_);
+ host_->PauseRequest(info->process_id, info->request_id, false);
+ if (!CompleteResponseStarted(info->request_id, false))
+ host_->CancelRequest(info->process_id, info->request_id, false);
+ }
+ Release();
}