diff --git a/dom/src/jsurl/nsJSProtocolHandler.cpp b/dom/src/jsurl/nsJSProtocolHandler.cpp index 6ea26d7c6c9..6223604f8d3 100644 --- a/dom/src/jsurl/nsJSProtocolHandler.cpp +++ b/dom/src/jsurl/nsJSProtocolHandler.cpp @@ -280,7 +280,8 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel, nsIXPConnect *xpc = nsContentUtils::XPConnect(); nsCOMPtr 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