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:
Chris Jones 2011-02-01 13:53:53 -06:00
Родитель 3f6be53357
Коммит a4d9e36f36
1 изменённых файлов: 19 добавлений и 15 удалений

Просмотреть файл

@ -87,26 +87,30 @@ ScopedXREEmbed::Start()
NS_ENSURE_TRUE(localFile,);
#ifdef OS_MACOSX
rv = localFile->GetParent(getter_AddRefs(parent));
if (NS_FAILED(rv))
return;
if (XRE_GetProcessType() == GeckoProcessType_Content) {
// We're an XPCOM-using subprocess. Walk out of
// [subprocess].app/Contents/MacOS to the real GRE dir.
rv = localFile->GetParent(getter_AddRefs(parent));
if (NS_FAILED(rv))
return;
localFile = do_QueryInterface(parent);
NS_ENSURE_TRUE(localFile,);
localFile = do_QueryInterface(parent);
NS_ENSURE_TRUE(localFile,);
rv = localFile->GetParent(getter_AddRefs(parent));
if (NS_FAILED(rv))
return;
rv = localFile->GetParent(getter_AddRefs(parent));
if (NS_FAILED(rv))
return;
localFile = do_QueryInterface(parent);
NS_ENSURE_TRUE(localFile,);
localFile = do_QueryInterface(parent);
NS_ENSURE_TRUE(localFile,);
rv = localFile->GetParent(getter_AddRefs(parent));
if (NS_FAILED(rv))
return;
rv = localFile->GetParent(getter_AddRefs(parent));
if (NS_FAILED(rv))
return;
localFile = do_QueryInterface(parent);
NS_ENSURE_TRUE(localFile,);
localFile = do_QueryInterface(parent);
NS_ENSURE_TRUE(localFile,);
}
#endif
rv = XRE_InitEmbedding2(localFile, localFile, nsnull);