Bug 827217 - Fix null-pointer crash with webgl.can-lose-context-in-foreground=false.

This commit is contained in:
Justin Lebar 2013-01-07 09:44:22 +01:00
parent 4447f97d84
commit f7202ace62

View File

@ -430,6 +430,12 @@ InitProcessPriorityManager()
bool
CurrentProcessIsForeground()
{
// The process priority manager is the only thing which changes our priority,
// so if the manager does not exist, then we must be in the foreground.
if (!sManager) {
return true;
}
return sManager->GetPriority() >= PROCESS_PRIORITY_FOREGROUND;
}