Bug 1769322 - Allow for the possibility of non-xpc globals in nsIGlobal::IsScriptForbidden r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D146347
This commit is contained in:
@@ -976,7 +976,7 @@ bool ModuleLoaderBase::InstantiateModuleGraph(ModuleLoadRequest* aRequest) {
|
||||
}
|
||||
|
||||
JS::Rooted<JSObject*> module(jsapi.cx(), moduleScript->ModuleRecord());
|
||||
if (!xpc::Scriptability::Get(module).Allowed()) {
|
||||
if (!xpc::Scriptability::AllowedIfExists(module)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1091,7 +1091,7 @@ nsresult ModuleLoaderBase::EvaluateModuleInContext(
|
||||
JS::Rooted<JSObject*> module(aCx, moduleScript->ModuleRecord());
|
||||
MOZ_ASSERT(module);
|
||||
|
||||
if (!xpc::Scriptability::Get(module).Allowed()) {
|
||||
if (!xpc::Scriptability::AllowedIfExists(module)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user