Commit 96d54383 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Migrate off BrowserThread::DeleteSoon in /ios/web_view

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=jzw@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: Ib72a7df0175f5cd438052510e6ddf1eeefbefa59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895644
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: default avatarJohn Wu <jzw@chromium.org>
Commit-Queue: John Wu <jzw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713145}
parent 330e7566
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/task/post_task.h"
#include "components/flags_ui/pref_service_flags_storage.h" #include "components/flags_ui/pref_service_flags_storage.h"
#include "components/prefs/json_pref_store.h" #include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_registry_simple.h"
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
#include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/translate/core/browser/translate_download_manager.h" #include "components/translate/core/browser/translate_download_manager.h"
#include "components/variations/net/variations_http_headers.h" #include "components/variations/net/variations_http_headers.h"
#include "ios/web/public/thread/web_task_traits.h"
#include "ios/web/public/thread/web_thread.h" #include "ios/web/public/thread/web_thread.h"
#include "ios/web_view/cwv_web_view_buildflags.h" #include "ios/web_view/cwv_web_view_buildflags.h"
#include "ios/web_view/internal/app/web_view_io_thread.h" #include "ios/web_view/internal/app/web_view_io_thread.h"
...@@ -79,8 +81,8 @@ void ApplicationContext::SaveState() { ...@@ -79,8 +81,8 @@ void ApplicationContext::SaveState() {
shared_url_loader_factory_->Detach(); shared_url_loader_factory_->Detach();
if (network_context_) { if (network_context_) {
web::WebThread::DeleteSoon(web::WebThread::IO, FROM_HERE, base::DeleteSoon(FROM_HERE, {web::WebThread::IO},
network_context_owner_.release()); network_context_owner_.release());
} }
} }
......
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