зеркало из https://github.com/mozilla/pjs.git
Bug 625060: Only plugin-container needs to walk out of plugin-container.app/Content/MacOS to find the real GRE dir. r=bent
--HG-- extra : rebase_source : a679b5caf11b507f15d952cb1979e73b125a5b0a
This commit is contained in:
Родитель
3f6be53357
Коммит
a4d9e36f36
|
@ -87,26 +87,30 @@ ScopedXREEmbed::Start()
|
||||||
NS_ENSURE_TRUE(localFile,);
|
NS_ENSURE_TRUE(localFile,);
|
||||||
|
|
||||||
#ifdef OS_MACOSX
|
#ifdef OS_MACOSX
|
||||||
rv = localFile->GetParent(getter_AddRefs(parent));
|
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||||
if (NS_FAILED(rv))
|
// We're an XPCOM-using subprocess. Walk out of
|
||||||
return;
|
// [subprocess].app/Contents/MacOS to the real GRE dir.
|
||||||
|
rv = localFile->GetParent(getter_AddRefs(parent));
|
||||||
|
if (NS_FAILED(rv))
|
||||||
|
return;
|
||||||
|
|
||||||
localFile = do_QueryInterface(parent);
|
localFile = do_QueryInterface(parent);
|
||||||
NS_ENSURE_TRUE(localFile,);
|
NS_ENSURE_TRUE(localFile,);
|
||||||
|
|
||||||
rv = localFile->GetParent(getter_AddRefs(parent));
|
rv = localFile->GetParent(getter_AddRefs(parent));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
localFile = do_QueryInterface(parent);
|
localFile = do_QueryInterface(parent);
|
||||||
NS_ENSURE_TRUE(localFile,);
|
NS_ENSURE_TRUE(localFile,);
|
||||||
|
|
||||||
rv = localFile->GetParent(getter_AddRefs(parent));
|
rv = localFile->GetParent(getter_AddRefs(parent));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
localFile = do_QueryInterface(parent);
|
localFile = do_QueryInterface(parent);
|
||||||
NS_ENSURE_TRUE(localFile,);
|
NS_ENSURE_TRUE(localFile,);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rv = XRE_InitEmbedding2(localFile, localFile, nsnull);
|
rv = XRE_InitEmbedding2(localFile, localFile, nsnull);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче