Bug 1108613. Create an XRE_IsParentProcess to detect if code is running in the parent process. r=roc

This commit is contained in:
Mason Chang 2014-12-09 11:21:47 -08:00
parent 623aec497e
commit 92e6a610c8
2 changed files with 9 additions and 0 deletions

View File

@ -4562,6 +4562,12 @@ XRE_GetProcessType()
return mozilla::startup::sChildProcessType;
}
bool
XRE_IsParentProcess()
{
return XRE_GetProcessType() == GeckoProcessType_Default;
}
static void
LogE10sBlockedReason(const char *reason) {
gBrowserTabsRemoteDisabledReason.Assign(NS_ConvertASCIItoUTF16(reason));

View File

@ -407,6 +407,9 @@ XRE_API(nsresult,
XRE_API(GeckoProcessType,
XRE_GetProcessType, ())
XRE_API(bool,
XRE_IsParentProcess, ())
typedef void (*MainFunction)(void* aData);
XRE_API(nsresult,