зеркало из https://github.com/mozilla/gecko-dev.git
Bug 844211 - Only check the XBL bit if XBL scopes are disabled. r=bz
This commit is contained in:
Родитель
8b3e09e2eb
Коммит
39877875a7
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче