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

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

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=bashi@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: I5a2520de651ab0f3786f4a25203ee62cc755fb0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895643
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712555}
parent 8f2397f2
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
#include <algorithm> #include <algorithm>
#include <utility> #include <utility>
#include "base/task/post_task.h"
#include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h" #include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/browser/site_instance_impl.h" #include "content/browser/site_instance_impl.h"
#include "content/browser/storage_partition_impl.h" #include "content/browser/storage_partition_impl.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/site_instance.h" #include "content/public/browser/site_instance.h"
#include "content/public/common/child_process_host.h" #include "content/public/common/child_process_host.h"
...@@ -196,7 +198,6 @@ namespace std { ...@@ -196,7 +198,6 @@ namespace std {
// thread. // thread.
void default_delete<content::ServiceWorkerProcessManager>::operator()( void default_delete<content::ServiceWorkerProcessManager>::operator()(
content::ServiceWorkerProcessManager* ptr) const { content::ServiceWorkerProcessManager* ptr) const {
content::BrowserThread::DeleteSoon( base::DeleteSoon(FROM_HERE, {content::BrowserThread::UI}, ptr);
content::BrowserThread::UI, FROM_HERE, ptr);
} }
} // namespace std } // namespace std
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