Commit 9ccbab06 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate off BrowserThread::DeleteSoon in /content/browser/appcache

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=mek@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: Ie172f571ab430c800b6476186e82917743f46afb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895638
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711776}
parent d3081ec6
......@@ -7,9 +7,11 @@
#include <utility>
#include "base/files/file_path.h"
#include "base/task/post_task.h"
#include "content/browser/appcache/appcache_storage_impl.h"
#include "content/browser/loader/navigation_url_loader_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
......@@ -76,7 +78,7 @@ void ChromeAppCacheService::DeleteOnCorrectThread() const {
return;
}
if (BrowserThread::IsThreadInitialized(BrowserThread::UI)) {
BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this);
base::DeleteSoon(FROM_HERE, {BrowserThread::UI}, this);
return;
}
// Better to leak than crash on shutdown.
......
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