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

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: comments 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
« no previous file with comments | « 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..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()
« no previous file with comments | « chrome/chrome.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698