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

Unified Diff: content/common/sandbox_mac.mm

Issue 10389047: mac: Don't require DYLD_LIBRARY_PATH to be set when using the shared build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpler Created 8 years, 7 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
« build/common.gypi ('K') | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_mac.mm
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index 90b7fe921a0f6a62d4c19a15ce29cb6e80447cbe..42fac8c3721db01e31c34814749ab0134da7dbf6 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();
}
}
@@ -380,10 +380,20 @@ NSString* LoadSandboxTemplate(int sandbox_type) {
return nil;
}
- scoped_nsobject<NSString> common_sandbox_prefix_data(
- [[NSString alloc] initWithBytes:common_sandbox_definition.data()
- length:common_sandbox_definition.length()
- encoding:NSUTF8StringEncoding]);
+ NSString* common_sandbox_prefix_data =
Mark Mentovai 2012/05/30 13:38:22 I’m leery of taking this out of the scoped_nsobjec
Nico 2012/05/30 15:03:29 Done.
+ [[[NSString alloc] initWithBytes:common_sandbox_definition.data()
+ length:common_sandbox_definition.length()
+ encoding:NSUTF8StringEncoding] autorelease];
+
+#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()) {
+ common_sandbox_prefix_data = [common_sandbox_prefix_data
+ stringByAppendingString:@"\n(allow file-read-metadata)\n"];
+ }
+#endif
scoped_nsobject<NSString> sandbox_data(
[[NSString alloc] initWithBytes:sandbox_definition.data()
« build/common.gypi ('K') | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698