Bug 1261785 - Part 3: make affected JS files eslint-clean. r=mratcliffe
authorJarda Snajdr <jsnajdr@gmail.com>
Tue, 19 Apr 2016 01:44:00 +0200
changeset 331653 15763e59a810ebda0a0855a230dbe0eb8471fd13
parent 331652 acb76d90e6713f6e4277105c2cb6ffba11a8a012
child 331654 f4dd4c0aaadc9141ac4c78b170a5a9cdf295cf56
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmratcliffe
bugs1261785
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1261785 - Part 3: make affected JS files eslint-clean. r=mratcliffe
devtools/client/framework/test/shared-head.js
devtools/client/storage/test/browser_storage_cache_error.js
devtools/client/storage/test/browser_storage_cookies_delete_all.js
devtools/client/storage/test/browser_storage_delete.js
devtools/client/storage/test/browser_storage_delete_all.js
devtools/client/storage/test/browser_storage_delete_tree.js
devtools/server/actors/storage.js
--- a/devtools/client/framework/test/shared-head.js
+++ b/devtools/client/framework/test/shared-head.js
@@ -4,17 +4,18 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // This shared-head.js file is used for multiple mochitest test directories in
 // devtools.
 // It contains various common helper functions.
 
-var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr, Constructor: CC} = Components;
+const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr, Constructor: CC}
+  = Components;
 
 function scopedCuImport(path) {
   const scope = {};
   Cu.import(path, scope);
   return scope;
 }
 
 const {console} = scopedCuImport("resource://gre/modules/Console.jsm");
@@ -35,33 +36,36 @@ const URL_ROOT_SSL = CHROME_URL_ROOT.rep
                                              "https://example.com/");
 
 // All test are asynchronous
 waitForExplicitFinish();
 
 var EXPECTED_DTU_ASSERT_FAILURE_COUNT = 0;
 
 registerCleanupFunction(function() {
-  if (DevToolsUtils.assertionFailureCount !== EXPECTED_DTU_ASSERT_FAILURE_COUNT) {
-    ok(false, "Should have had the expected number of DevToolsUtils.assert() failures. Expected " +
-      EXPECTED_DTU_ASSERT_FAILURE_COUNT + ", got " + DevToolsUtils.assertionFailureCount);
+  if (DevToolsUtils.assertionFailureCount !==
+      EXPECTED_DTU_ASSERT_FAILURE_COUNT) {
+    ok(false,
+      "Should have had the expected number of DevToolsUtils.assert() failures."
+      + " Expected " + EXPECTED_DTU_ASSERT_FAILURE_COUNT
+      + ", got " + DevToolsUtils.assertionFailureCount);
   }
 });
 
 // Uncomment this pref to dump all devtools emitted events to the console.
 // Services.prefs.setBoolPref("devtools.dump.emit", true);
 
 /**
  * Watch console messages for failed propType definitions in React components.
  */
 const ConsoleObserver = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
 
   observe: function(subject, topic, data) {
-    var message = subject.wrappedJSObject.arguments[0];
+    let message = subject.wrappedJSObject.arguments[0];
 
     if (/Failed propType/.test(message)) {
       ok(false, message);
     }
   }
 };
 
 Services.obs.addObserver(ConsoleObserver, "console-api-log-event", false);
@@ -98,33 +102,33 @@ registerCleanupFunction(function* cleanu
   }
 });
 
 /**
  * Add a new test tab in the browser and load the given url.
  * @param {String} url The url to be loaded in the new tab
  * @return a promise that resolves to the tab object when the url is loaded
  */
-var addTab = Task.async(function*(url) {
+var addTab = Task.async(function* (url) {
   info("Adding a new tab with URL: " + url);
 
   let tab = gBrowser.selectedTab = gBrowser.addTab(url);
   yield once(gBrowser.selectedBrowser, "load", true);
 
   info("Tab added and finished loading");
 
   return tab;
 });
 
 /**
  * Remove the given tab.
  * @param {Object} tab The tab to be removed.
  * @return Promise<undefined> resolved when the tab is successfully removed.
  */
-var removeTab = Task.async(function*(tab) {
+var removeTab = Task.async(function* (tab) {
   info("Removing tab.");
 
   let onClose = once(gBrowser.tabContainer, "TabClose");
   gBrowser.removeTab(tab);
   yield onClose;
 
   info("Tab removed and finished closing");
 });
@@ -160,17 +164,18 @@ function synthesizeKeyFromKeyTag(key) {
   EventUtils.synthesizeKey(name, modifiers);
 }
 
 /**
  * Wait for eventName on target.
  * @param {Object} target An observable object that either supports on/off or
  * addEventListener/removeEventListener
  * @param {String} eventName
- * @param {Boolean} useCapture Optional, for addEventListener/removeEventListener
+ * @param {Boolean} useCapture Optional, for
+ *        addEventListener/removeEventListener
  * @return A promise that resolves when the event has been handled
  */
 function once(target, eventName, useCapture = false) {
   info("Waiting for event: '" + eventName + "' on " + target + ".");
 
   let deferred = promise.defer();
 
   for (let [add, remove] of [
@@ -189,18 +194,18 @@ function once(target, eventName, useCapt
   }
 
   return deferred.promise;
 }
 
 /**
  * Some tests may need to import one or more of the test helper scripts.
  * A test helper script is simply a js file that contains common test code that
- * is either not common-enough to be in head.js, or that is located in a separate
- * directory.
+ * is either not common-enough to be in head.js, or that is located in a
+ * separate directory.
  * The script will be loaded synchronously and in the test's scope.
  * @param {String} filePath The file path, relative to the current directory.
  *                 Examples:
  *                 - "helper_attributes_test_runner.js"
  *                 - "../../../commandline/test/helpers.js"
  */
 function loadHelperScript(filePath) {
   let testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
@@ -219,17 +224,17 @@ function waitForTick() {
 
 /**
  * Open the toolbox in a given tab.
  * @param {XULNode} tab The tab the toolbox should be opened in.
  * @param {String} toolId Optional. The ID of the tool to be selected.
  * @param {String} hostType Optional. The type of toolbox host to be used.
  * @return {Promise} Resolves with the toolbox, when it has been opened.
  */
-var openToolboxForTab = Task.async(function*(tab, toolId, hostType) {
+var openToolboxForTab = Task.async(function* (tab, toolId, hostType) {
   info("Opening the toolbox");
 
   let toolbox;
   let target = TargetFactory.forTab(tab);
   yield target.makeRemote();
 
   // Check if the toolbox is already loaded.
   toolbox = gDevTools.getToolbox(target);
@@ -239,34 +244,35 @@ var openToolboxForTab = Task.async(funct
       return toolbox;
     }
   }
 
   // If not, load it now.
   toolbox = yield gDevTools.showToolbox(target, toolId, hostType);
 
   // Make sure that the toolbox frame is focused.
-  yield new Promise(resolve => waitForFocus(resolve, toolbox.frame.contentWindow));
+  yield new Promise(resolve => waitForFocus(resolve,
+    toolbox.frame.contentWindow));
 
   info("Toolbox opened and focused");
 
   return toolbox;
 });
 
 /**
  * Add a new tab and open the toolbox in it.
  * @param {String} url The URL for the tab to be opened.
  * @param {String} toolId Optional. The ID of the tool to be selected.
  * @param {String} hostType Optional. The type of toolbox host to be used.
  * @return {Promise} Resolves when the tab has been added, loaded and the
  * toolbox has been opened. Resolves to the toolbox.
  */
-var openNewTabAndToolbox = Task.async(function*(url, toolId, hostType) {
+var openNewTabAndToolbox = Task.async(function* (url, toolId, hostType) {
   let tab = yield addTab(url);
-  return openToolboxForTab(tab, toolId, hostType)
+  return openToolboxForTab(tab, toolId, hostType);
 });
 
 /**
  * Close a tab and if necessary, the toolbox that belongs to it
  * @param {Tab} tab The tab to close.
  * @return {Promise} Resolves when the toolbox and tab have been destroyed and
  * closed.
  */
@@ -309,23 +315,23 @@ function waitUntil(predicate, interval =
   });
 }
 
 /**
  * Takes a string `script` and evaluates it directly in the content
  * in potentially a different process.
  */
 let MM_INC_ID = 0;
-function evalInDebuggee (mm, script) {
-  return new Promise(function (resolve, reject) {
+function evalInDebuggee(mm, script) {
+  return new Promise(function(resolve, reject) {
     let id = MM_INC_ID++;
     mm.sendAsyncMessage("devtools:test:eval", { script, id });
     mm.addMessageListener("devtools:test:eval:response", handler);
 
-    function handler ({ data }) {
+    function handler({ data }) {
       if (id !== data.id) {
         return;
       }
 
       info(`Successfully evaled in debuggee: ${script}`);
       mm.removeMessageListener("devtools:test:eval:response", handler);
       resolve(data.value);
     }
--- a/devtools/client/storage/test/browser_storage_cache_error.js
+++ b/devtools/client/storage/test/browser_storage_cache_error.js
@@ -1,14 +1,12 @@
 /* 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 http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from head.js */
-
 "use strict";
 
 // Test handling errors in CacheStorage
 
 add_task(function* () {
   yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-cache-error.html");
 
   const cacheItemId = ["Cache", "javascript:parent.frameContent"];
--- a/devtools/client/storage/test/browser_storage_cookies_delete_all.js
+++ b/devtools/client/storage/test/browser_storage_cookies_delete_all.js
@@ -1,13 +1,13 @@
 /* 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 http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from head.js */
+/* import-globals-from ../../framework/test/shared-head.js */
 
 "use strict";
 
 // Test deleting all cookies
 
 function* performDelete(store, rowName, deleteAll) {
   let contextMenu = gPanelWindow.document.getElementById(
     "storage-table-popup");
--- a/devtools/client/storage/test/browser_storage_delete.js
+++ b/devtools/client/storage/test/browser_storage_delete.js
@@ -1,13 +1,13 @@
 /* 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 http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from head.js */
+/* import-globals-from ../../framework/test/shared-head.js */
 
 "use strict";
 
 // Test deleting storage items
 
 const TEST_CASES = [
   [["localStorage", "http://test1.example.org"],
     "ls1", "name"],
--- a/devtools/client/storage/test/browser_storage_delete_all.js
+++ b/devtools/client/storage/test/browser_storage_delete_all.js
@@ -1,13 +1,13 @@
 /* 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 http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from head.js */
+/* import-globals-from ../../framework/test/shared-head.js */
 
 "use strict";
 
 // Test deleting all storage items
 
 add_task(function* () {
   yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-listings.html");
 
--- a/devtools/client/storage/test/browser_storage_delete_tree.js
+++ b/devtools/client/storage/test/browser_storage_delete_tree.js
@@ -1,13 +1,13 @@
 /* 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 http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from head.js */
+/* import-globals-from ../../framework/test/shared-head.js */
 
 "use strict";
 
 // Test deleting all storage items from the tree.
 
 add_task(function* () {
   yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-listings.html");
 
--- a/devtools/server/actors/storage.js
+++ b/devtools/server/actors/storage.js
@@ -244,17 +244,17 @@ StorageActors.defaults = function(typeNa
 
     /**
      * When a new window is added to the page. This generally means that a new
      * iframe is created, or the current window is completely reloaded.
      *
      * @param {window} window
      *        The window which was added.
      */
-    onWindowReady: Task.async(function*(window) {
+    onWindowReady: Task.async(function* (window) {
       let host = this.getHostName(window.location);
       if (!this.hostVsStores.has(host)) {
         yield this.populateStoresForHost(host, window);
         let data = {};
         data[host] = this.getNamesForHost(host);
         this.storageActor.update("added", typeName, data);
       }
     }),
@@ -328,17 +328,17 @@ StorageActors.defaults = function(typeNa
      *
      * @return {object} An object containing following properties:
      *          - offset - The actual offset of the returned array. This might
      *                     be different from the requested offset if that was
      *                     invalid
      *          - total - The total number of entries possible.
      *          - data - The requested values.
      */
-    getStoreObjects: method(Task.async(function*(host, names, options = {}) {
+    getStoreObjects: method(Task.async(function* (host, names, options = {}) {
       let offset = options.offset || 0;
       let size = options.size || MAX_STORE_OBJECT_COUNT;
       if (size > MAX_STORE_OBJECT_COUNT) {
         size = MAX_STORE_OBJECT_COUNT;
       }
       let sortOn = options.sortOn || "name";
 
       let toReturn = {
@@ -354,18 +354,18 @@ StorageActors.defaults = function(typeNa
         let win = this.storageActor.getWindowFromHost(host);
         if (win) {
           principal = win.document.nodePrincipal;
         }
       }
 
       if (names) {
         for (let name of names) {
-          let values =
-            yield this.getValuesForHost(host, name, options, this.hostVsStores, principal);
+          let values = yield this.getValuesForHost(host, name, options,
+            this.hostVsStores, principal);
 
           let {result, objectStores} = values;
 
           if (result && typeof result.objectsSize !== "undefined") {
             for (let {key, count} of result.objectsSize) {
               this.objectsSize[key] = count;
             }
           }
@@ -647,17 +647,17 @@ StorageActors.createActor({
   },
 
   /**
    * This method marks the table as editable.
    *
    * @return {Array}
    *         An array of column header ids.
    */
-  getEditableFields: method(Task.async(function*() {
+  getEditableFields: method(Task.async(function* () {
     return [
       "name",
       "path",
       "host",
       "expires",
       "value",
       "isSecure",
       "isHttpOnly"
@@ -670,36 +670,36 @@ StorageActors.createActor({
   }),
 
   /**
    * Pass the editItem command from the content to the chrome process.
    *
    * @param {Object} data
    *        See editCookie() for format details.
    */
-  editItem: method(Task.async(function*(data) {
+  editItem: method(Task.async(function* (data) {
     this.editCookie(data);
   }), {
     request: {
       data: Arg(0, "json"),
     },
     response: {}
   }),
 
-  removeItem: method(Task.async(function*(host, name) {
+  removeItem: method(Task.async(function* (host, name) {
     this.removeCookie(host, name);
   }), {
     request: {
       host: Arg(0, "string"),
       name: Arg(1, "string"),
     },
     response: {}
   }),
 
-  removeAll: method(Task.async(function*(host, domain) {
+  removeAll: method(Task.async(function* (host, domain) {
     this.removeAllCookies(host, domain);
   }), {
     request: {
       host: Arg(0, "string"),
       domain: Arg(1, "nullable:string")
     },
     response: {}
   }),
@@ -1124,17 +1124,17 @@ function getObjectForLocalOrSessionStora
     },
 
     /**
      * This method marks the fields as editable.
      *
      * @return {Array}
      *         An array of field ids.
      */
-    getEditableFields: method(Task.async(function*() {
+    getEditableFields: method(Task.async(function* () {
       return [
         "name",
         "value"
       ];
     }), {
       request: {},
       response: {
         value: RetVal("json")
@@ -1142,17 +1142,17 @@ function getObjectForLocalOrSessionStora
     }),
 
     /**
      * Edit localStorage or sessionStorage fields.
      *
      * @param {Object} data
      *        See editCookie() for format details.
      */
-    editItem: method(Task.async(function*({host, field, oldValue, items}) {
+    editItem: method(Task.async(function* ({host, field, oldValue, items}) {
       let storage = this.hostVsStores.get(host);
 
       if (field === "name") {
         storage.removeItem(oldValue);
       }
 
       storage.setItem(items.name, items.value);
     }), {
@@ -1203,28 +1203,28 @@ function getObjectForLocalOrSessionStora
       }
 
       return {
         name: item.name,
         value: new LongStringActor(this.conn, item.value || "")
       };
     },
 
-    removeItem: method(Task.async(function*(host, name) {
+    removeItem: method(Task.async(function* (host, name) {
       let storage = this.hostVsStores.get(host);
       storage.removeItem(name);
     }), {
       request: {
         host: Arg(0),
         name: Arg(1),
       },
       response: {}
     }),
 
-    removeAll: method(Task.async(function*(host) {
+    removeAll: method(Task.async(function* (host) {
       let storage = this.hostVsStores.get(host);
       storage.clear();
     }), {
       request: {
         host: Arg(0)
       },
       response: {}
     }),
@@ -1260,33 +1260,33 @@ types.addDictType("cachestoreobject", {
   offset: "number",
   data: "array:nullable:cacheobject"
 });
 
 StorageActors.createActor({
   typeName: "Cache",
   storeObjectType: "cachestoreobject"
 }, {
-  getCachesForHost: Task.async(function*(host) {
+  getCachesForHost: Task.async(function* (host) {
     let uri = Services.io.newURI(host, null, null);
     let principal =
       Services.scriptSecurityManager.getNoAppCodebasePrincipal(uri);
 
     // The first argument tells if you want to get |content| cache or |chrome|
     // cache.
     // The |content| cache is the cache explicitely named by the web content
     // (service worker or web page).
     // The |chrome| cache is the cache implicitely cached by the platform,
     // hosting the source file of the service worker.
     let { CacheStorage } = this.storageActor.window;
     let cache = new CacheStorage("content", principal);
     return cache;
   }),
 
-  preListStores: Task.async(function*() {
+  preListStores: Task.async(function* () {
     for (let host of this.hosts) {
       yield this.populateStoresForHost(host);
     }
   }),
 
   form: function(form, detail) {
     if (detail === "actorid") {
       return this.actorID;
@@ -1305,17 +1305,17 @@ StorageActors.createActor({
 
   getNamesForHost: function(host) {
     // UI code expect each name to be a JSON string of an array :/
     return [...this.hostVsStores.get(host).keys()].map(a => {
       return JSON.stringify([a]);
     });
   },
 
-  getValuesForHost: Task.async(function*(host, name) {
+  getValuesForHost: Task.async(function* (host, name) {
     if (!name) {
       return [];
     }
     // UI is weird and expect a JSON stringified array... and pass it back :/
     name = JSON.parse(name)[0];
 
     let cache = this.hostVsStores.get(host).get(name);
     let requests = yield cache.keys();
@@ -1325,31 +1325,31 @@ StorageActors.createActor({
       // Unwrap the response to get access to all its properties if the
       // response happen to be 'opaque', when it is a Cross Origin Request.
       response = response.cloneUnfiltered();
       results.push(yield this.processEntry(request, response));
     }
     return results;
   }),
 
-  processEntry: Task.async(function*(request, response) {
+  processEntry: Task.async(function* (request, response) {
     return {
       url: String(request.url),
       status: String(response.statusText),
     };
   }),
 
   getHostName: function(location) {
     if (!location.host) {
       return location.href;
     }
     return location.protocol + "//" + location.host;
   },
 
-  populateStoresForHost: Task.async(function*(host) {
+  populateStoresForHost: Task.async(function* (host) {
     let storeMap = new Map();
     let caches = yield this.getCachesForHost(host);
     try {
       for (let name of (yield caches.keys())) {
         storeMap.set(name, (yield caches.open(name)));
       }
     } catch (ex) {
       console.error(`Failed to enumerate CacheStorage for host ${host}:`, ex);
@@ -1599,25 +1599,25 @@ StorageActors.createActor({
   },
 
   /**
    * Purpose of this method is same as populateStoresForHosts but this is async.
    * This exact same operation cannot be performed in populateStoresForHosts
    * method, as that method is called in initialize method of the actor, which
    * cannot be asynchronous.
    */
-  preListStores: Task.async(function*() {
+  preListStores: Task.async(function* () {
     this.hostVsStores = new Map();
 
     for (let host of this.hosts) {
       yield this.populateStoresForHost(host);
     }
   }),
 
-  populateStoresForHost: Task.async(function*(host) {
+  populateStoresForHost: Task.async(function* (host) {
     let storeMap = new Map();
     let {names} = yield this.getDBNamesForHost(host);
     let win = this.storageActor.getWindowFromHost(host);
     if (win) {
       let principal = win.document.nodePrincipal;
 
       for (let name of names) {
         let metadata = yield this.getDBMetaData(host, principal, name);
@@ -1752,17 +1752,17 @@ var indexedDBHelpers = {
     });
   },
 
   /**
    * Fetches and stores all the metadata information for the given database
    * `name` for the given `host` with its `principal`. The stored metadata
    * information is of `DatabaseMetadata` type.
    */
-  getDBMetaData: Task.async(function*(host, principal, name) {
+  getDBMetaData: Task.async(function* (host, principal, name) {
     let request = this.openWithPrincipal(principal, name);
     let success = promise.defer();
 
     request.onsuccess = event => {
       let db = event.target.result;
 
       let dbData = new DatabaseMetadata(host, db);
       db.close();
@@ -1775,26 +1775,27 @@ var indexedDBHelpers = {
                     host);
       this.backToChild("getDBMetaData", null);
       success.resolve(null);
     };
     return success.promise;
   }),
 
   /**
-   * Opens an indexed db connection for the given `principal` and database `name`.
+   * Opens an indexed db connection for the given `principal` and
+   * database `name`.
    */
   openWithPrincipal: function(principal, name) {
     return require("indexedDB").openForPrincipal(principal, name);
   },
 
     /**
    * Fetches all the databases and their metadata for the given `host`.
    */
-  getDBNamesForHost: Task.async(function*(host) {
+  getDBNamesForHost: Task.async(function* (host) {
     let sanitizedHost = this.getSanitizedHost(host);
     let directory = OS.Path.join(OS.Constants.Path.profileDir, "storage",
                                  "default", sanitizedHost, "idb");
 
     let exists = yield OS.File.exists(directory);
     if (!exists && host.startsWith("about:")) {
       // try for moz-safe-about directory
       sanitizedHost = this.getSanitizedHost("moz-safe-" + host);
@@ -1840,17 +1841,17 @@ var indexedDBHelpers = {
   getSanitizedHost: function(host) {
     return host.replace(ILLEGAL_CHAR_REGEX, "+");
   },
 
   /**
    * Retrieves the proper indexed db database name from the provided .sqlite
    * file location.
    */
-  getNameFromDatabaseFile: Task.async(function*(path) {
+  getNameFromDatabaseFile: Task.async(function* (path) {
     let connection = null;
     let retryCount = 0;
 
     // Content pages might be having an open transaction for the same indexed db
     // which this sqlite file belongs to. In that case, sqlite.openConnection
     // will throw. Thus we retey for some time to see if lock is removed.
     while (!connection && retryCount++ < 25) {
       try {
@@ -1872,18 +1873,18 @@ var indexedDBHelpers = {
 
     let name = rows[0].getResultByName("name");
 
     yield connection.close();
 
     return name;
   }),
 
-  getValuesForHost:
-  Task.async(function*(host, name = "null", options, hostVsStores, principal) {
+  getValuesForHost: Task.async(function* (host, name = "null", options,
+                                          hostVsStores, principal) {
     name = JSON.parse(name);
     if (!name || !name.length) {
       // This means that details about the db in this particular host are
       // requested.
       let dbs = [];
       if (hostVsStores.has(host)) {
         for (let [, db] of hostVsStores.get(host)) {
           db = indexedDBHelpers.patchMetadataMapsAndProtos(db);
@@ -1907,18 +1908,18 @@ var indexedDBHelpers = {
 
         for (let objectStore2 of objectStores2) {
           objectStores.push(objectStore2[1].toObject());
         }
       }
       return this.backToChild("getValuesForHost", {objectStores: objectStores});
     }
     // Get either all entries from the object store, or a particular id
-    let result = yield this.getObjectStoreData(host, principal, db2, objectStore, id,
-                                               options.index, options.size);
+    let result = yield this.getObjectStoreData(host, principal, db2,
+      objectStore, id, options.index, options.size);
     return this.backToChild("getValuesForHost", {result: result});
   }),
 
   /**
    * Returns all or requested entries from a particular objectStore from the db
    * in the given host.
    *
    * @param {string} host
@@ -2309,17 +2310,17 @@ var StorageActor = exports.StorageActor 
    * Lists the available hosts for all the registered storage types.
    *
    * @returns {object} An object containing with the following structure:
    *  - <storageType> : [{
    *      actor: <actorId>,
    *      host: <hostname>
    *    }]
    */
-  listStores: method(Task.async(function*() {
+  listStores: method(Task.async(function* () {
     let toReturn = {};
 
     for (let [name, value] of this.childActorPool) {
       if (value.preListStores) {
         yield value.preListStores();
       }
       toReturn[name] = value;
     }