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

Unified Diff: base/sequenced_task_runner.h

Issue 2657283002: Do not delete synchronously in OnTaskRunnerDeleter. (Closed)
Patch Set: Created 3 years, 11 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: base/sequenced_task_runner.h
diff --git a/base/sequenced_task_runner.h b/base/sequenced_task_runner.h
index 0bedf2e1b9251190b09dd3a409a4db4689f3e81c..de91bd9285b2f35fd952642e9439d8e35935b331 100644
--- a/base/sequenced_task_runner.h
+++ b/base/sequenced_task_runner.h
@@ -163,9 +163,7 @@ struct BASE_EXPORT OnTaskRunnerDeleter {
template <typename T>
void operator()(const T* ptr) {
- if (task_runner_->RunsTasksOnCurrentThread())
- delete ptr;
- else if (ptr)
+ if (ptr)
task_runner_->DeleteSoon(FROM_HERE, ptr);
}
« 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