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:
Kris Maglione
2017-09-03 18:51:02 -07:00
parent 23f86a0885
commit fd54e6524a
13 changed files with 24 additions and 18 deletions

View File

@@ -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;
}