mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 844211 - Only check the XBL bit if XBL scopes are disabled. r=bz
This commit is contained in:
parent
516023dd47
commit
e0c3558345
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user