summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 15:35:24 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 15:35:24 +0000
commitd47bae8cd8234e621fcd627259f969513e74f7d7 (patch)
treec5739a9c742a3e350a99a7ddeeb9bf52d7b2bfbf /chrome
parent1fe8d83df42e5e80db2fd9d092a282881fbb1dce (diff)
downloadchromium_src-d47bae8cd8234e621fcd627259f969513e74f7d7.zip
chromium_src-d47bae8cd8234e621fcd627259f969513e74f7d7.tar.gz
chromium_src-d47bae8cd8234e621fcd627259f969513e74f7d7.tar.bz2
Sandbox fix - warmup -[NSColor colorUsingColorSpaceName].
Also move HandleRendererErrorTestParameters() back to the top of RendererMain(). Review URL: http://codereview.chromium.org/27135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/renderer_main.cc9
-rw-r--r--chrome/renderer/renderer_main_platform_delegate_mac.mm4
2 files changed, 11 insertions, 2 deletions
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc
index 8e70dee..dd8a2ba 100644
--- a/chrome/renderer/renderer_main.cc
+++ b/chrome/renderer/renderer_main.cc
@@ -70,6 +70,13 @@ static void HandleRendererErrorTestParameters(const CommandLine& command_line) {
int RendererMain(const MainFunctionParams& parameters) {
const CommandLine& parsed_command_line = parameters.command_line_;
base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_;
+
+ // This function allows pausing execution using the --renderer-startup-dialog
+ // flag allowing us to attach a debugger.
+ // Do not move this function down since that would mean we can't easily debug
+ // whatever occurs before it.
+ HandleRendererErrorTestParameters(parsed_command_line);
+
RendererMainPlatformDelegate platform(parameters);
StatsScope<StatsCounterTimer>
@@ -88,8 +95,6 @@ int RendererMain(const MainFunctionParams& parameters) {
bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox);
platform.InitSandboxTests(no_sandbox);
- HandleRendererErrorTestParameters(parsed_command_line);
-
// Initialize histogram statistics gathering system.
// Don't create StatisticsRecorde in the single process mode.
scoped_ptr<StatisticsRecorder> statistics;
diff --git a/chrome/renderer/renderer_main_platform_delegate_mac.mm b/chrome/renderer/renderer_main_platform_delegate_mac.mm
index e1a6d41..0791c57 100644
--- a/chrome/renderer/renderer_main_platform_delegate_mac.mm
+++ b/chrome/renderer/renderer_main_platform_delegate_mac.mm
@@ -43,6 +43,10 @@ void RendererMainPlatformDelegate::PlatformInitialize() {
CGColorSpaceRelease(rgb_colorspace);
CGContextRelease(tmp);
+ // Warm up NSColor conversion which also accesses the FS on it's first call.
+ NSColor *color = [NSColor controlTextColor];
+ [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
+
#if 0
// Note: by default, Cocoa is NOT thread safe. Use of NSThreads