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:
@@ -3290,7 +3290,7 @@ nsHTMLDocument::ExecCommand(const nsAString& commandID,
|
||||
|
||||
bool restricted = commandID.LowerCaseEqualsLiteral("paste");
|
||||
if (restricted && !nsContentUtils::PrincipalHasPermission(&aSubjectPrincipal,
|
||||
NS_LITERAL_STRING("clipboardRead"))) {
|
||||
nsGkAtoms::clipboardRead)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user