Bug 1619379 - follow up to fix eslint. rs=bustage
authorKai Engert <kaie@kuix.de>
Sun, 08 Mar 2020 20:38:42 +0100
changeset 37509 fcce8c8159add66bb306e8cad6f5ede51b619605
parent 37508 5c68b2fdcca6dab9a5d200cc26cff38be01b0fab
child 37510 381b9496d886a8f8a217a0e7fd2ed727a71e3f97
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1619379
Bug 1619379 - follow up to fix eslint. rs=bustage
mail/extensions/openpgp/content/ui/commonWorkflows.js
--- a/mail/extensions/openpgp/content/ui/commonWorkflows.js
+++ b/mail/extensions/openpgp/content/ui/commonWorkflows.js
@@ -1,45 +1,49 @@
 /*
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
  */
 
 "use strict";
 
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var EnigmailDialog = ChromeUtils.import(
   "chrome://openpgp/content/modules/dialog.jsm"
 ).EnigmailDialog;
 var EnigmailLocale = ChromeUtils.import(
   "chrome://openpgp/content/modules/locale.jsm"
 ).EnigmailLocale;
 var { EnigmailKey } = ChromeUtils.import(
   "chrome://openpgp/content/modules/key.jsm"
 );
 var EnigmailKeyRing = ChromeUtils.import(
   "chrome://openpgp/content/modules/keyRing.jsm"
 ).EnigmailKeyRing;
 
-
 /**
  * opens a prompt, asking the user to enter passphrase for given key id
  * returns: the passphrase if entered (empty string is allowed)
  * resultFlags.canceled is set to true if the user clicked cancel
  */
 function passphrasePromptCallback(win, keyId, resultFlags) {
   let p = {};
   p.value = "";
   let dummy = {};
-  if (!Services.prompt.promptPassword(win,
-    "",
-    EnigmailLocale.getString("passphrasePrompt", [keyId]),
-    p,
-    null,
-    dummy)) {
+  if (
+    !Services.prompt.promptPassword(
+      win,
+      "",
+      EnigmailLocale.getString("passphrasePrompt", [keyId]),
+      p,
+      null,
+      dummy
+    )
+  ) {
     resultFlags.canceled = true;
     return "";
   }
 
   resultFlags.canceled = false;
   return p.value;
 }
 
@@ -57,17 +61,22 @@ function EnigmailCommon_importKeysFromFi
     [EnigmailLocale.getString("gnupgFile"), "*.asc;*.gpg;*.pgp"]
   );
   if (!inFile) {
     return false;
   }
 
   let errorMsgObj = {};
   // preview
-  let preview = EnigmailKey.getKeyListFromKeyFile(inFile, errorMsgObj, !secret, secret);
+  let preview = EnigmailKey.getKeyListFromKeyFile(
+    inFile,
+    errorMsgObj,
+    !secret,
+    secret
+  );
 
   if (errorMsgObj.value && errorMsgObj.value.length > 0) {
     EnigmailDialog.alert(window, errorMsgObj.value);
     return false;
   }
   let exitStatus = -1;
 
   if (preview.length > 0) {
@@ -90,17 +99,25 @@ function EnigmailCommon_importKeysFromFi
             .join("\n"),
         ])
       );
     }
 
     if (exitStatus) {
       // import
       let resultKeys = {};
-      let exitCode = EnigmailKeyRing.importKeyFromFile(window, passphrasePromptCallback, inFile, errorMsgObj, resultKeys, !secret, secret);
+      let exitCode = EnigmailKeyRing.importKeyFromFile(
+        window,
+        passphrasePromptCallback,
+        inFile,
+        errorMsgObj,
+        resultKeys,
+        !secret,
+        secret
+      );
       if (exitCode !== 0) {
         EnigmailDialog.alert(
           window,
           EnigmailLocale.getString("importKeysFailed") +
             "\n\n" +
             errorMsgObj.value
         );
       } else {