Bug 987003. Be more careful sandboxing javascript: URLs. r=bholley

This commit is contained in:
Boris Zbarsky 2014-03-26 21:44:25 -04:00
parent b493de34a5
commit c2b9053884

View File

@ -280,7 +280,8 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel,
nsIXPConnect *xpc = nsContentUtils::XPConnect();
nsCOMPtr<nsIXPConnectJSObjectHolder> sandbox;
rv = xpc->CreateSandbox(cx, principal, getter_AddRefs(sandbox));
// Important: Use a null principal here
rv = xpc->CreateSandbox(cx, nullptr, getter_AddRefs(sandbox));
NS_ENSURE_SUCCESS(rv, rv);
// The nsXPConnect sandbox API gives us a wrapper to the sandbox for