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

Issue 180025: Merge 24777 - Fix crashonlaunch on Snow Leopard... (Closed)

Created:
11 years, 3 months ago by jon
Modified:
9 years, 7 months ago
Reviewers:
jeremy
CC:
chromium-reviews_googlegroups.com, John Grabowski, darin (slow to review), brettw, jam
Visibility:
Public.

Description

Merge 24777 - Fix crashonlaunch on Snow Leopard The signalself syntax needed to fix bug 20370 doesn't work on Leopard and causes the Sandbox to barf so renderers don't star tup. We introduce a ;10.5_ONLY keyword to the sandbox that is substituted at runtime (the line with the rule is effectively uncommented). This allows us to use leopard or snowleapardonly sandbox syntax BUG=20516 TEST=Chrome should no longer crash on launch under SL. Review URL: http://codereview.chromium.org/183003 TBR=jeremy@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=24785

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -1 line) Patch
MM chrome/renderer/renderer.sb View 1 chunk +2 lines, -1 line 0 comments Download
MM chrome/renderer/renderer_main_platform_delegate_mac.mm View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
jon
11 years, 3 months ago (2009-08-28 20:00:55 UTC) #1
jeremy
11 years, 3 months ago (2009-08-28 20:44:16 UTC) #2
LGTM

On Fri, Aug 28, 2009 at 1:00 PM, <jon@chromium.org> wrote:

> Reviewers: jeremy,
>
> Description:
> Merge 24777 - Fix crashonlaunch on Snow Leopard
>
> The signalself syntax needed to fix bug 20370 doesn't work on Leopard
> and
> causes the Sandbox to barf so renderers don't star tup.
>
> We introduce a ;10.5_ONLY keyword to the sandbox that is substituted at
> runtime (the line with the rule is effectively uncommented).  This
> allows us to use leopard or snowleapardonly sandbox syntax
>
> BUG=20516
> TEST=Chrome should no longer crash on launch under SL.
>
> Review URL: http://codereview.chromium.org/183003
>
> TBR=jeremy@chromium.org
>
>
> Please review this at http://codereview.chromium.org/180025
>
> SVN Base: svn://chrome-svn/chrome/branches/203/src/
>
> Affected files:
>  MM    chrome/renderer/renderer.sb
>  MM    chrome/renderer/renderer_main_platform_delegate_mac.mm
>
>
> Index: chrome/renderer/renderer_main_platform_delegate_mac.mm
> ===================================================================
> --- chrome/renderer/renderer_main_platform_delegate_mac.mm      (revision
> 24784)
> +++ chrome/renderer/renderer_main_platform_delegate_mac.mm      (working
> copy)
> @@ -131,6 +131,20 @@
>       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);
>
> Property changes on: chrome\renderer\
> renderer_main_platform_delegate_mac.mm
> ___________________________________________________________________
> Added: svn:mergeinfo
>   Merged
>
/branches/chrome_webkit_merge_branch/chrome/renderer/renderer_main_platform_delegate_mac.mm:
> r69-2775
>   Merged /trunk/src/chrome/renderer/renderer_main_platform_delegate_mac.mm:
> r24777
>
> Index: chrome/renderer/renderer.sb
> ===================================================================
> --- chrome/renderer/renderer.sb (revision 24784)
> +++ chrome/renderer/renderer.sb (working copy)
> @@ -7,7 +7,8 @@
>  (deny default)
>
>  ; Allow sending signals to self - http://crbug.com/20370
> -(allow %signal-self)
> +; ;10.5_ONLY is substitued for a blank string at runtime as needed.
> +;10.5_ONLY (allow %signal-self)
>
>  ; Needed for full-page-zoomed controls - http://crbug.com/11325
>  (allow sysctl-read)
>
> Property changes on: chrome\renderer\renderer.sb
> ___________________________________________________________________
> Modified: svn:mergeinfo
>   Merged /trunk/src/chrome/renderer/renderer.sb:r24777
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698