summaryrefslogtreecommitdiff
path: root/chromium/content/browser/browser_process_sub_thread.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-16 11:45:35 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-17 08:59:23 +0000
commit552906b0f222c5d5dd11b9fd73829d510980461a (patch)
tree3a11e6ed0538a81dd83b20cf3a4783e297f26d91 /chromium/content/browser/browser_process_sub_thread.cc
parent1b05827804eaf047779b597718c03e7d38344261 (diff)
downloadqtwebengine-chromium-552906b0f222c5d5dd11b9fd73829d510980461a.tar.gz
BASELINE: Update Chromium to 83.0.4103.122
Change-Id: Ie3a82f5bb0076eec2a7c6a6162326b4301ee291e Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/content/browser/browser_process_sub_thread.cc')
-rw-r--r--chromium/content/browser/browser_process_sub_thread.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/chromium/content/browser/browser_process_sub_thread.cc b/chromium/content/browser/browser_process_sub_thread.cc
index 550b8fce86e..f7c731ed7f9 100644
--- a/chromium/content/browser/browser_process_sub_thread.cc
+++ b/chromium/content/browser/browser_process_sub_thread.cc
@@ -5,10 +5,11 @@
#include "content/browser/browser_process_sub_thread.h"
#include "base/bind.h"
-#include "base/clang_coverage_buildflags.h"
+#include "base/clang_profiling_buildflags.h"
#include "base/compiler_specific.h"
#include "base/debug/alias.h"
#include "base/metrics/histogram_macros.h"
+#include "base/threading/hang_watcher.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/memory_dump_manager.h"
#include "content/browser/browser_child_process_host_impl.h"
@@ -131,6 +132,15 @@ NOINLINE void BrowserProcessSubThread::UIThreadRun(base::RunLoop* run_loop) {
NOINLINE void BrowserProcessSubThread::IOThreadRun(base::RunLoop* run_loop) {
const int line_number = __LINE__;
+
+ // Register the IO thread for hang watching before it starts running and set
+ // up a closure to automatically unregister it when Run() returns.
+ base::ScopedClosureRunner unregister_thread_closure;
+ if (base::FeatureList::IsEnabled(base::HangWatcher::kEnableHangWatcher)) {
+ unregister_thread_closure =
+ base::HangWatcher::GetInstance()->RegisterThread();
+ }
+
Thread::Run(run_loop);
base::debug::Alias(&line_number);
}
@@ -149,11 +159,11 @@ void BrowserProcessSubThread::IOThreadCleanUp() {
UtilityProcessHost* utility_process =
static_cast<UtilityProcessHost*>(it.GetDelegate());
if (utility_process->sandbox_type() ==
- service_manager::SANDBOX_TYPE_NETWORK) {
+ service_manager::SandboxType::kNetwork) {
// This ensures that cookies and cache are flushed to disk on shutdown.
// https://crbug.com/841001
-#if BUILDFLAG(CLANG_COVERAGE)
- // On coverage build, browser_tests runs 10x slower.
+#if BUILDFLAG(CLANG_PROFILING)
+ // On profiling build, browser_tests runs 10x slower.
const int kMaxSecondsToWaitForNetworkProcess = 100;
#elif defined(OS_CHROMEOS)
// ChromeOS will kill the browser process if it doesn't shut down within