Bug 1517483 - Get rid of nsIScriptSecurityManager::IsSystemPrincipal r=bzbarsky
Replaced instances of callers in both C++ and JS files to query the state from the principal directly. Differential Revision: https://phabricator.services.mozilla.com/D22532
This commit is contained in:
@@ -210,12 +210,9 @@ namespace {
|
||||
bool IsChromeJSScript(JSScript* aScript) {
|
||||
// May be called from another thread or inside a signal handler.
|
||||
// We assume querying the script is safe but we must not manipulate it.
|
||||
nsIScriptSecurityManager* const secman =
|
||||
nsScriptSecurityManager::GetScriptSecurityManager();
|
||||
NS_ENSURE_TRUE(secman, false);
|
||||
|
||||
JSPrincipals* const principals = JS_GetScriptPrincipals(aScript);
|
||||
return secman->IsSystemPrincipal(nsJSPrincipals::get(principals));
|
||||
return nsJSPrincipals::get(principals)->IsSystemPrincipal();
|
||||
}
|
||||
|
||||
// Get the full path after the URI scheme, if the URI matches the scheme.
|
||||
|
||||
Reference in New Issue
Block a user