Bug 844211 - Only check the XBL bit if XBL scopes are disabled. r=bz

This commit is contained in:
Bobby Holley 2013-03-05 15:16:37 -08:00
Родитель 8b3e09e2eb
Коммит 39877875a7
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -1761,9 +1761,11 @@ nsContentUtils::IsCallerXBL()
JSContext *cx = GetCurrentJSContext();
if (!cx)
return false;
// New Hotness.
if (xpc::IsXBLScope(js::GetContextCompartment(cx)))
return true;
if (XPCJSRuntime::Get()->XBLScopesEnabled())
return xpc::IsXBLScope(js::GetContextCompartment(cx));
// XBL scopes are behind a pref, so check the XBL bit as well.
if (!JS_DescribeScriptedCaller(cx, &script, nullptr) || !script)
return false;