summaryrefslogtreecommitdiff
path: root/xpcom
diff options
context:
space:
mode:
authorStephen Pohl <spohl.mozilla.bugs@gmail.com>2014-09-29 11:51:04 -0700
committerSteven Schlansker <sschlansker@opentable.com>2016-09-13 17:34:53 -0700
commit2755ccf46ae0beec084ca0215d3c046cfff5ceb7 (patch)
treea279d38608a80fd96521cc74129c0e0b360b8279 /xpcom
parentd79459b7f52528f477c84469449d50550abea26f (diff)
downloadpalemoon-gre-2755ccf46ae0beec084ca0215d3c046cfff5ceb7.tar.gz
Mac v2 signing - Bug 1050944 - Get Firefox to launch and run on OSX with the new .app bundle structure, made necessary by Apple's v2 signatures. r=smichaud, r=ted, sr=bsmedberg
Diffstat (limited to 'xpcom')
-rw-r--r--xpcom/build/XPCOMInit.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp
index 4aa9c40cd..04439139a 100644
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -611,6 +611,17 @@ NS_InitXPCOM2(nsIServiceManager** aResult,
xpcomLib->GetPath(path);
gGREBinPath = ToNewUnicode(path);
+#ifdef XP_MACOSX
+ nsCOMPtr<nsIFile> parent;
+ xpcomLib->GetParent(getter_AddRefs(parent));
+ parent->AppendNative(NS_LITERAL_CSTRING("MacOS"));
+ bool pathExists = false;
+ parent->Exists(&pathExists);
+ if (pathExists) {
+ xpcomLib = parent.forget();
+ }
+#endif
+
xpcomLib->AppendNative(nsDependentCString(XPCOM_DLL));
nsDirectoryService::gService->Set(NS_XPCOM_LIBRARY_FILE, xpcomLib);