Bug 1362891, part 1 - Add an XRE_IsE10sParentProcess function. r=froydnj

MozReview-Commit-ID: 6neyZj71i3r

--HG--
extra : rebase_source : a172d64a03f2af8b2b1e4820645295c8d64e8118
This commit is contained in:
Jonathan Watt 2017-04-24 09:38:10 +01:00
Родитель f5ba7a67d6
Коммит 6f36936674
2 изменённых файлов: 21 добавлений и 0 удалений

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

@ -4918,12 +4918,22 @@ XRE_IsGPUProcess()
return XRE_GetProcessType() == GeckoProcessType_GPU;
}
/**
* Returns true in the e10s parent process and in the main process when e10s
* is disabled.
*/
bool
XRE_IsParentProcess()
{
return XRE_GetProcessType() == GeckoProcessType_Default;
}
bool
XRE_IsE10sParentProcess()
{
return XRE_IsParentProcess() && BrowserTabsRemoteAutostart();
}
bool
XRE_IsContentProcess()
{

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

@ -442,6 +442,17 @@ XRE_API(nsresult,
XRE_API(GeckoProcessType,
XRE_GetProcessType, ())
/**
* Returns true when called in the e10s parent process. Does *NOT* return true
* when called in the main process if e10s is disabled.
*/
XRE_API(bool,
XRE_IsE10sParentProcess, ())
/**
* Returns true when called in the e10s parent process or called in the main
* process when e10s is disabled.
*/
XRE_API(bool,
XRE_IsParentProcess, ())