Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1993)

Unified Diff: content/common/net/url_fetcher_core.cc

Issue 10105018: URLFetcher: Skip posting to IO thread if already on IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/net/url_fetcher_core.cc
diff --git a/content/common/net/url_fetcher_core.cc b/content/common/net/url_fetcher_core.cc
index deaa8642d85c901f9397ea4a9a1a73f888ca8498..b062fb37da7cc4e2c0e45e29dd6fca9d2bc20194 100644
--- a/content/common/net/url_fetcher_core.cc
+++ b/content/common/net/url_fetcher_core.cc
@@ -331,7 +331,11 @@ void URLFetcherCore::Stop() {
delegate_ = 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(
FROM_HERE, base::Bind(&URLFetcherCore::CancelURLRequest, this));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698