Commit e8d3aa81 authored by willchan@chromium.org's avatar willchan@chromium.org

URLFetcher: Skip posting to IO thread if already on IO thread.

BUG=123224
TEST=none


Review URL: http://codereview.chromium.org/10105018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132539 0039d316-1c4b-4281-b951-d872f2087c98
parent 0e589042
...@@ -331,7 +331,11 @@ void URLFetcherCore::Stop() { ...@@ -331,7 +331,11 @@ void URLFetcherCore::Stop() {
delegate_ = NULL; delegate_ = NULL;
fetcher_ = NULL; fetcher_ = NULL;
if (io_message_loop_proxy_.get()) { if (!io_message_loop_proxy_.get())
return;
if (io_message_loop_proxy_->RunsTasksOnCurrentThread()) {
CancelURLRequest();
} else {
io_message_loop_proxy_->PostTask( io_message_loop_proxy_->PostTask(
FROM_HERE, base::Bind(&URLFetcherCore::CancelURLRequest, this)); FROM_HERE, base::Bind(&URLFetcherCore::CancelURLRequest, this));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment