Bug 1368211 - Don't create gnome shell service in headlesss mode. r=jrmuizel

This commit is contained in:
Brendan Dahl
2017-07-10 15:21:34 -07:00
parent c7c6b00bb6
commit c27fd9e6dd

View File

@@ -32,6 +32,7 @@
#include "nsIImageToPixbuf.h"
#endif
#include "nsXULAppAPI.h"
#include "gfxPlatform.h"
#include <glib.h>
#include <glib-object.h>
@@ -86,6 +87,10 @@ nsGNOMEShellService::Init()
{
nsresult rv;
if (gfxPlatform::IsHeadless()) {
return NS_ERROR_NOT_AVAILABLE;
}
// GConf, GSettings or GIO _must_ be available, or we do not allow
// CreateInstance to succeed.