Bug 1396449: Part 2 - Use atoms to test WebExtension permissions. r=krizsa
The extension policy services uses atoms internally for permission names, so using them directly rather than strings is considerably cheaper. MozReview-Commit-ID: Io8EuOXHKVy
This commit is contained in:
@@ -7570,9 +7570,8 @@ HTMLMediaElement::MarkAsTainted()
|
||||
bool
|
||||
HasDebuggerOrTabsPrivilege(JSContext* aCx, JSObject* aObj)
|
||||
{
|
||||
return nsContentUtils::CallerHasPermission(aCx,
|
||||
NS_LITERAL_STRING("debugger")) ||
|
||||
nsContentUtils::CallerHasPermission(aCx, NS_LITERAL_STRING("tabs"));
|
||||
return nsContentUtils::CallerHasPermission(aCx, nsGkAtoms::debugger) ||
|
||||
nsContentUtils::CallerHasPermission(aCx, nsGkAtoms::tabs);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user