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

Migrate off BrowserThread::DeleteSoon in /chrome/browser/safe_browsing

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=nparker@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: Ib62b09b24e40615b3f5853d3da1c056250fe446b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895646
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarNathan Parker <nparker@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711735}
parent fb7524e3
...@@ -305,8 +305,7 @@ class ClientSideDetectionHostTestBase : public ChromeRenderViewHostTestHarness { ...@@ -305,8 +305,7 @@ class ClientSideDetectionHostTestBase : public ChromeRenderViewHostTestHarness {
void TearDown() override { void TearDown() override {
// Delete the host object on the UI thread and release the // Delete the host object on the UI thread and release the
// SafeBrowsingService. // SafeBrowsingService.
BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, base::DeleteSoon(FROM_HERE, {BrowserThread::UI}, csd_host_.release());
csd_host_.release());
database_manager_ = NULL; database_manager_ = NULL;
ui_manager_ = NULL; ui_manager_ = NULL;
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
......
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