diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index fe5f5cfa74..0869944610 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -2721,7 +2721,7 @@ nsContentUtils::SubjectPrincipal() MOZ_ASSERT(NS_IsMainThread()); JSContext* cx = GetCurrentJSContext(); if (!cx) { - MOZ_CRASH("Accessing the Subject Principal without an AutoJSAPI on the stack is forbidden"); + return GetSystemPrincipal(); } JSCompartment *compartment = js::GetContextCompartment(cx);