Bug xxx - manual (eslint) fixes r=jryans draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Mon, 19 Feb 2018 02:50:40 -0800
changeset 758592 84240220996f9c7ac43fb04379850de90d67992f
parent 758591 84dd64c6dbaf043444b901334abcc98a7afb4e7c
child 758593 8209765ca6e894a6505ca02096db6eb0193ba1f3
push id100112
push userbmo:poirot.alex@gmail.com
push dateThu, 22 Feb 2018 18:20:39 +0000
reviewersjryans
milestone60.0a1
Bug xxx - manual (eslint) fixes r=jryans MozReview-Commit-ID: 5WwX9B5Gtpd
devtools/shared/async-utils.js
devtools/shared/fronts/memory.js
devtools/shared/security/auth.js
devtools/shared/security/socket.js
devtools/shared/system.js
--- a/devtools/shared/async-utils.js
+++ b/devtools/shared/async-utils.js
@@ -8,17 +8,16 @@
  * Helpers for async functions. Async functions are generator functions that are
  * run by Tasks. An async function returns a Promise for the resolution of the
  * function. When the function returns, the promise is resolved with the
  * returned value. If it throws the promise rejects with the thrown error.
  *
  * See Task documentation at https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Task.jsm.
  */
 
-
 /**
  * Adds an event listener to the given element, and then removes its event
  * listener once the event is called, returning the event object as a promise.
  * @param  nsIDOMElement element
  *         The DOM element to listen on
  * @param  String event
  *         The name of the event type to listen for
  * @param  Boolean useCapture
--- a/devtools/shared/fronts/memory.js
+++ b/devtools/shared/fronts/memory.js
@@ -43,17 +43,17 @@ const MemoryFront = protocol.FrontClassW
   saveHeapSnapshot: protocol.custom(async function (options = {}) {
     const snapshotId = await this._saveHeapSnapshotImpl(options.boundaries);
 
     if (!options.forceCopy &&
         (await HeapSnapshotFileUtils.haveHeapSnapshotTempFile(snapshotId))) {
       return HeapSnapshotFileUtils.getHeapSnapshotTempFilePath(snapshotId);
     }
 
-    return await this.transferHeapSnapshot(snapshotId);
+    return this.transferHeapSnapshot(snapshotId);
   }, {
     impl: "_saveHeapSnapshotImpl"
   }),
 
   /**
    * Given that we have taken a heap snapshot with the given id, transfer the
    * heap snapshot file to the client. The path to the client's local file is
    * returned.
--- a/devtools/shared/security/auth.js
+++ b/devtools/shared/security/auth.js
@@ -337,17 +337,17 @@ OOBCert.Client.prototype = {
       // authentication steps
       if (activeSendDialog && activeSendDialog.close) {
         activeSendDialog.close();
         activeSendDialog = null;
       }
     };
 
     transport.hooks = {
-      async onPacket(packet) {
+      onPacket: async (packet) => {
         closeDialog();
         let { authResult } = packet;
         switch (authResult) {
           case AuthenticationResult.PENDING:
             // Step B.8
             // Client creates hash(ClientCert) + K(random 128-bit number)
             oobData = await this._createOOB();
             activeSendDialog = this.sendOOB({
@@ -376,17 +376,17 @@ OOBCert.Client.prototype = {
             // Debugging begins
             transport.hooks = null;
             deferred.resolve(transport);
             break;
           default:
             transport.close(new Error("Invalid auth result: " + authResult));
             break;
         }
-      }.bind(this),
+      },
       onClosed(reason) {
         closeDialog();
         // Transport died before auth completed
         transport.hooks = null;
         deferred.reject(reason);
       }
     };
     transport.ready();
--- a/devtools/shared/security/socket.js
+++ b/devtools/shared/security/socket.js
@@ -47,17 +47,16 @@ DevToolsUtils.defineLazyGetter(this, "ce
          .getService(Ci.nsICertOverrideService);
 });
 
 DevToolsUtils.defineLazyGetter(this, "nssErrorsService", () => {
   return Cc["@mozilla.org/nss_errors_service;1"]
          .getService(Ci.nsINSSErrorsService);
 });
 
-
 var DebuggerSocket = {};
 
 /**
  * Connects to a debugger server socket.
  *
  * @param host string
  *        The host name or IP address of the debugger server.
  * @param port number
--- a/devtools/shared/system.js
+++ b/devtools/shared/system.js
@@ -318,13 +318,13 @@ function getSetting(name) {
       handleError: (error) => deferred.reject(error),
     });
   } else {
     deferred.reject(new Error("No settings service"));
   }
   return deferred.promise;
 }
 
-exports.getSystemInfo = Task.async(getSystemInfo);
+exports.getSystemInfo = getSystemInfo;
 exports.getSetting = getSetting;
 exports.getScreenDimensions = getScreenDimensions;
 exports.getOSCPU = getOSCPU;
 exports.constants = AppConstants;