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

Unified Diff: content/browser/child_process_launcher_helper.cc

Issue 2839353002: Revert of Remove post_launch_on_client_thread_called (Closed)
Patch Set: Created 3 years, 8 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
Index: content/browser/child_process_launcher_helper.cc
diff --git a/content/browser/child_process_launcher_helper.cc b/content/browser/child_process_launcher_helper.cc
index 5d6e9aa6e64e33da84ae4277b585410413798f7e..9aa83459ba904dbf4e7db6a08f125a156cdda4a9 100644
--- a/content/browser/child_process_launcher_helper.cc
+++ b/content/browser/child_process_launcher_helper.cc
@@ -104,27 +104,30 @@
AfterLaunchOnLauncherThread(process, options);
if (is_synchronous_launch) {
- PostLaunchOnLauncherThread(std::move(process), launch_result);
+ PostLaunchOnLauncherThread(std::move(process), launch_result, false);
}
}
void ChildProcessLauncherHelper::PostLaunchOnLauncherThread(
ChildProcessLauncherHelper::Process process,
- int launch_result) {
+ int launch_result,
+ bool post_launch_on_client_thread_called) {
// Release the client handle now that the process has been started (the pipe
// may not signal when the process dies otherwise and we would not detect the
// child process died).
mojo_client_handle_.reset();
if (process.process.IsValid()) {
- RecordHistogramsOnLauncherThread(base::TimeTicks::Now() -
- begin_launch_time_);
+ RecordHistogramsOnLauncherThread(
+ base::TimeTicks::Now() - begin_launch_time_);
}
- BrowserThread::PostTask(
- client_thread_id_, FROM_HERE,
- base::Bind(&ChildProcessLauncherHelper::PostLaunchOnClientThread, this,
- base::Passed(&process), launch_result));
+ if (!post_launch_on_client_thread_called) {
+ BrowserThread::PostTask(
+ client_thread_id_, FROM_HERE,
+ base::Bind(&ChildProcessLauncherHelper::PostLaunchOnClientThread,
+ this, base::Passed(&process), launch_result));
+ }
}
void ChildProcessLauncherHelper::PostLaunchOnClientThread(
« no previous file with comments | « content/browser/child_process_launcher_helper.h ('k') | content/browser/child_process_launcher_helper_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698