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

Unified Diff: chrome/renderer/renderer_main_platform_delegate_mac.mm

Issue 183003: Fix crash-on-launch on Snow Leopard (Closed)
Patch Set: Created 11 years, 4 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
« chrome/renderer/renderer.sb ('K') | « chrome/renderer/renderer.sb ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/renderer_main_platform_delegate_mac.mm
diff --git a/chrome/renderer/renderer_main_platform_delegate_mac.mm b/chrome/renderer/renderer_main_platform_delegate_mac.mm
index a165909a25bf072910ab7f7975ca4ff4810bab30..0b657c3f285b63cd47708a6422d4c0b95fd80e09 100644
--- a/chrome/renderer/renderer_main_platform_delegate_mac.mm
+++ b/chrome/renderer/renderer_main_platform_delegate_mac.mm
@@ -131,6 +131,20 @@ bool RendererMainPlatformDelegate::EnableSandbox() {
stringByReplacingOccurrencesOfString:@"USER_HOMEDIR"
withString:NSHomeDirectory()];
+ // Enable 10.5 only sandbox syntax.
+ int32 major_version = 0;
+ int32 minor_version = 0;
+ int32 bugfix_version = 0;
+ base::SysInfo::OperatingSystemVersionNumbers(&major_version,
+ &minor_version,
+ &bugfix_version);
+
+ if (major_version == 10 && minor_version == 5) {
+ sandbox_data = [sandbox_data
+ stringByReplacingOccurrencesOfString:@";10.5_ONLY"
+ withString:@""];
+ }
+
char* error_buff = NULL;
int error = sandbox_init([sandbox_data UTF8String], 0, &error_buff);
bool success = (error == 0 && error_buff == NULL);
« chrome/renderer/renderer.sb ('K') | « chrome/renderer/renderer.sb ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698