Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: content/browser/child_process_launcher.cc

Issue 2910083002: Replace deprecated base::NonThreadSafe in content/browser in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/child_process_launcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_launcher.cc
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index 6015c1cfa14b5625ce50f77f217e8f039b45c71a..0d87a7d941394a5c2275ca5c077077cbe9c1b795 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -41,7 +41,7 @@ ChildProcessLauncher::ChildProcessLauncher(
terminate_child_on_shutdown_(terminate_on_shutdown),
#endif
weak_factory_(this) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
CHECK(BrowserThread::GetCurrentThreadIdentifier(&client_thread_id_));
helper_ = new ChildProcessLauncherHelper(
@@ -52,7 +52,7 @@ ChildProcessLauncher::ChildProcessLauncher(
}
ChildProcessLauncher::~ChildProcessLauncher() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (process_.process.IsValid() && terminate_child_on_shutdown_) {
// Client has gone away, so just kill the process.
ChildProcessLauncherHelper::ForceNormalProcessTerminationAsync(
@@ -62,7 +62,7 @@ ChildProcessLauncher::~ChildProcessLauncher() {
void ChildProcessLauncher::SetProcessPriority(bool background,
bool boost_for_pending_views) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
base::Process to_pass = process_.process.Duplicate();
BrowserThread::PostTask(
BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
@@ -76,7 +76,7 @@ void ChildProcessLauncher::Notify(
ChildProcessLauncherHelper::Process process,
mojo::edk::ScopedPlatformHandle server_handle,
int error_code) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
starting_ = false;
process_ = std::move(process);
@@ -103,20 +103,20 @@ void ChildProcessLauncher::Notify(
bool ChildProcessLauncher::IsStarting() {
// TODO(crbug.com/469248): This fails in some tests.
- // DCHECK(CalledOnValidThread());
+ // DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return starting_;
}
const base::Process& ChildProcessLauncher::GetProcess() const {
// TODO(crbug.com/469248): This fails in some tests.
- // DCHECK(CalledOnValidThread());
+ // DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return process_.process;
}
base::TerminationStatus ChildProcessLauncher::GetChildTerminationStatus(
bool known_dead,
int* exit_code) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!process_.process.IsValid()) {
// Process is already gone, so return the cached termination status.
if (exit_code)
« no previous file with comments | « content/browser/child_process_launcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698