Commit f1bc502b authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate off BrowserThread::DeleteSoon in /components/feedback

Instead use base::DeleteSoon which enforces usage of TaskTraits.

This CL is a no-op as-is. It was recently discovered however that some
callers did BrowserThread::DeleteSoon() with pending tasks running on
different task queues (different traits  -- e.g.

TaskTraits to make this more obvious. Please review whether calls in
this CL can be migrated as-is or need additional traits to match
potentially pending tasks.

Split from https://chromium-review.googlesource.com/c/chromium/src/+/1894109
for cursory review.

This CL was uploaded by git cl split.

R=afakhry@chromium.org


TaskPriority: :BEST_EFFORT) which can result in out-of-order deletion...
BrowserThread: :DeleteSoon() is being migrated to base::DeleteSoon() w/
Bug: 1019767
Change-Id: I4f8b917edc1c858dde764dcec37fc04b4d8ca502
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895649
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Commit-Queue: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711787}
parent 265353f0
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "base/task/task_traits.h" #include "base/task/task_traits.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
using content::BrowserThread; using content::BrowserThread;
...@@ -141,7 +142,7 @@ void SystemLogsFetcher::RunCallbackAndDeleteSoon() { ...@@ -141,7 +142,7 @@ void SystemLogsFetcher::RunCallbackAndDeleteSoon() {
DCHECK(!callback_.is_null()); DCHECK(!callback_.is_null());
std::move(callback_).Run(std::move(response_)); std::move(callback_).Run(std::move(response_));
BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this); base::DeleteSoon(FROM_HERE, {BrowserThread::UI}, this);
} }
} // namespace system_logs } // namespace system_logs
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