Bug 1747059 - Use AllowIfExists in nsJSUtils::IsScriptable r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D147464
This commit is contained in:
Matthew Gaudet 2022-06-28 22:04:17 +00:00
Родитель a1e06076f6
Коммит 925f5e5114
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -139,7 +139,7 @@ nsresult nsJSUtils::CompileFunction(AutoJSAPI& jsapi,
/* static */
bool nsJSUtils::IsScriptable(JS::Handle<JSObject*> aEvaluationGlobal) {
return xpc::Scriptability::Get(aEvaluationGlobal).Allowed();
return xpc::Scriptability::AllowedIfExists(aEvaluationGlobal);
}
static bool AddScopeChainItem(JSContext* aCx, nsINode* aNode,