summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBo Liu <boliu@chromium.org>2015-04-06 14:56:57 -0700
committerBo Liu <boliu@chromium.org>2015-04-06 21:58:51 +0000
commitf2ddea1f97d8d19c46fd1e4d692fa0d5f97dd433 (patch)
tree0f1963a90ee5eef0b24b83142939f521f6fc2aa1
parent4d5231fe70c02793a22e5ead3088b3dd55fd2a3a (diff)
downloadchromium_src-f2ddea1f97d8d19c46fd1e4d692fa0d5f97dd433.zip
chromium_src-f2ddea1f97d8d19c46fd1e4d692fa0d5f97dd433.tar.gz
chromium_src-f2ddea1f97d8d19c46fd1e4d692fa0d5f97dd433.tar.bz2
Fix the startup sequence for in-process mode.
The GpuDataManager should be initialized before SetRunRendererInProcess to ensure the gpu features/blacklists are correctly set for renderer. BUG=468150 Review URL: https://codereview.chromium.org/1015633003 Cr-Commit-Position: refs/heads/master@{#321258} TBR=sievers@chromium.org Review URL: https://codereview.chromium.org/1057203002 Cr-Commit-Position: refs/branch-heads/2311@{#434} Cr-Branched-From: 09b7de5dd7254947cd4306de907274fa63373d48-refs/heads/master@{#317474}
-rw-r--r--content/browser/browser_main_loop.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index d9d39cb..100d928 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -611,13 +611,6 @@ int BrowserMainLoop::PreCreateThreads() {
}
#endif
-#if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID))
- // Single-process is an unsupported and not fully tested mode, so
- // don't enable it for official Chrome builds (except on Android).
- if (parsed_command_line_.HasSwitch(switches::kSingleProcess))
- RenderProcessHost::SetRunRendererInProcess(true);
-#endif
-
// Need to initialize in-process GpuDataManager before creating threads.
// It's unsafe to append the gpu command line switches to the global
// CommandLine::ForCurrentProcess object after threads are created.
@@ -637,6 +630,13 @@ int BrowserMainLoop::PreCreateThreads() {
GpuDataManagerImpl::GetInstance()->Initialize();
}
+#if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID))
+ // Single-process is an unsupported and not fully tested mode, so
+ // don't enable it for official Chrome builds (except on Android).
+ if (parsed_command_line_.HasSwitch(switches::kSingleProcess))
+ RenderProcessHost::SetRunRendererInProcess(true);
+#endif
+
return result_code_;
}