Bug 1052089 - Don't fuss around with remote-XUL XBL-scope special cases for sandboxes. r=billm

This commit is contained in:
Bobby Holley 2014-08-18 10:57:29 -07:00
parent 5d4f04bfc5
commit 281d7e6c29

View File

@ -58,7 +58,9 @@ RemoteXULForbidsXBLScope(nsIPrincipal *aPrincipal, HandleObject aGlobal)
// end up calling into AllowXULXBLForPrincipal, which depends on all kinds
// of persistent storage and permission machinery that may or not be running.
// We know the answer to the question here, so just short-circuit.
if (JS_GetClass(aGlobal) == &SafeJSContextGlobalClass)
//
// We do the same for sandboxes, for similar reasons.
if (JS_GetClass(aGlobal) == &SafeJSContextGlobalClass || IsSandbox(aGlobal))
return false;
// AllowXULXBLForPrincipal will return true for system principal, but we