Chromium Code Reviews| Index: content/common/sandbox_mac.mm |
| diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm |
| index 90b7fe921a0f6a62d4c19a15ce29cb6e80447cbe..6b3ca5a77499b4626cfabc0d86256a6710e9e212 100644 |
| --- a/content/common/sandbox_mac.mm |
| +++ b/content/common/sandbox_mac.mm |
| @@ -271,9 +271,9 @@ void Sandbox::SandboxWarmup(int sandbox_type) { |
| // Process-type dependent warm-up. |
| if (sandbox_type == content::SANDBOX_TYPE_GPU) { |
| - // Preload either the desktop GL or the osmesa so, depending on the |
| - // --use-gl flag. |
| - gfx::GLSurface::InitializeOneOff(); |
| + // Preload either the desktop GL or the osmesa so, depending on the |
| + // --use-gl flag. |
| + gfx::GLSurface::InitializeOneOff(); |
| } |
| } |
| @@ -385,6 +385,17 @@ NSString* LoadSandboxTemplate(int sandbox_type) { |
| length:common_sandbox_definition.length() |
| encoding:NSUTF8StringEncoding]); |
| +#if defined(COMPONENT_BUILD) |
| + // dlopen() fails without file-read-metadata access if the executable image |
| + // contains LC_RPATH load commands. The components build uses those. |
| + // See http://crbug.com/127465 |
| + if (base::mac::IsOSSnowLeopardOrEarlier()) { |
| + NSString* suffixed = [common_sandbox_prefix_data |
| + stringByAppendingString:@"\n(allow file-read-metadata)\n"]; |
|
jeremy
2012/05/30 16:33:17
Please move these lines to the Sandbox definition
Nico
2012/05/30 16:38:33
See bug, it needs file-read-metadata for the curre
|
| + common_sandbox_prefix_data.reset([suffixed retain]); |
| + } |
| +#endif |
| + |
| scoped_nsobject<NSString> sandbox_data( |
| [[NSString alloc] initWithBytes:sandbox_definition.data() |
| length:sandbox_definition.length() |