Bug 1231728 - Fixes some code to follow eslint rules. r=mak
authorFelipe Gomes <felipc@gmail.com>
Thu, 10 Dec 2015 14:38:30 -0500
changeset 310206 f4ce7427347e3b54b6155bca555df5487d6b63ce
parent 310205 54bb45fa0e7d9c56032fa4af7b5c69e7eb0d90f2
child 310207 11c67a7b46b5158bd48a7216ab45f124a71d4794
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1231728
milestone45.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 1231728 - Fixes some code to follow eslint rules. r=mak
browser/base/content/browser-places.js
browser/base/content/browser.js
browser/base/content/pageinfo/pageInfo.js
browser/components/extensions/ext-tabs.js
toolkit/components/feeds/FeedProcessor.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -313,18 +313,20 @@ var PlacesCommandHook = {
    *        a <browser> element.
    * @param [optional] aParent
    *        The folder in which to create a new bookmark if the page loaded in
    *        aBrowser isn't bookmarked yet, defaults to the unfiled root.
    * @param [optional] aShowEditUI
    *        whether or not to show the edit-bookmark UI for the bookmark item
    */
   bookmarkPage: Task.async(function* (aBrowser, aParent, aShowEditUI) {
-    if (PlacesUIUtils.useAsyncTransactions)
-      return (yield this._bookmarkPagePT(aBrowser, aParent, aShowEditUI));
+    if (PlacesUIUtils.useAsyncTransactions) {
+      yield this._bookmarkPagePT(aBrowser, aParent, aShowEditUI);
+      return;
+    }
 
     var uri = aBrowser.currentURI;
     var itemId = PlacesUtils.getMostRecentBookmarkForURI(uri);
     if (itemId == -1) {
       // Bug 1148838 - Make this code work for full page plugins.
       var title;
       var description;
       var charset;
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -497,18 +497,18 @@ var gPopupBlockerObserver = {
       this._reportButton = document.getElementById("page-report-button");
 
     if (!gBrowser.selectedBrowser.blockedPopups) {
       // Hide the icon in the location bar (if the location bar exists)
       if (gURLBar)
         this._reportButton.hidden = true;
 
       // Hide the notification box (if it's visible).
-      var notificationBox = gBrowser.getNotificationBox();
-      var notification = notificationBox.getNotificationWithValue("popup-blocked");
+      let notificationBox = gBrowser.getNotificationBox();
+      let notification = notificationBox.getNotificationWithValue("popup-blocked");
       if (notification) {
         notificationBox.removeNotification(notification, false);
       }
       return;
     }
 
     if (gURLBar)
       this._reportButton.hidden = false;
@@ -529,18 +529,18 @@ var gPopupBlockerObserver = {
         var popupButtonText = gNavigatorBundle.getString(stringKey);
         var popupButtonAccesskey = gNavigatorBundle.getString(stringKey + ".accesskey");
 
         var messageBase = gNavigatorBundle.getString("popupWarning.message");
         var message = PluralForm.get(popupCount, messageBase)
                                 .replace("#1", brandShortName)
                                 .replace("#2", popupCount);
 
-        var notificationBox = gBrowser.getNotificationBox();
-        var notification = notificationBox.getNotificationWithValue("popup-blocked");
+        let notificationBox = gBrowser.getNotificationBox();
+        let notification = notificationBox.getNotificationWithValue("popup-blocked");
         if (notification) {
           notification.label = message;
         }
         else {
           var buttons = [{
             label: popupButtonText,
             accessKey: popupButtonAccesskey,
             popup: "blockedPopupOptions",
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -834,17 +834,17 @@ function makePreview(row)
   setItemValue("imagelongdesctext", item.longDesc);
 
   // get cache info
   var cacheKey = url.replace(/#.*$/, "");
   openCacheEntry(cacheKey, function(cacheEntry) {
     // find out the file size
     var sizeText;
     if (cacheEntry) {
-      var imageSize = cacheEntry.dataSize;
+      let imageSize = cacheEntry.dataSize;
       var kbSize = Math.round(imageSize / 1024 * 100) / 100;
       sizeText = gBundle.getFormattedString("generalSize",
                                             [formatNumber(kbSize), formatNumber(imageSize)]);
     }
     else
       sizeText = gBundle.getString("mediaUnknownNotCached");
     setItemValue("imagesizetext", sizeText);
 
@@ -948,17 +948,17 @@ function makePreview(row)
     }
     else {
       // fallback image for protocols not allowed (e.g., javascript:)
       // or elements not [yet] handled (e.g., object, embed).
       document.getElementById("brokenimagecontainer").collapsed = false;
       document.getElementById("theimagecontainer").collapsed = true;
     }
 
-    var imageSize = "";
+    let imageSize = "";
     if (url && !isAudio) {
       if (width != physWidth || height != physHeight) {
         imageSize = gBundle.getFormattedString("mediaDimensionsScaled",
                                                [formatNumber(physWidth),
                                                 formatNumber(physHeight),
                                                 formatNumber(width),
                                                 formatNumber(height)]);
       }
--- a/browser/components/extensions/ext-tabs.js
+++ b/browser/components/extensions/ext-tabs.js
@@ -497,21 +497,21 @@ extensions.registerSchemaAPI("tabs", nul
         }
         mm.sendAsyncMessage("Extension:Execute",
                             {extensionId: extension.id, options});
 
         // TODO: Call the callback with the result (which is what???).
       },
 
       executeScript: function(tabId, details, callback) {
-        self.tabs._execute(tabId, details, 'js', callback);
+        self.tabs._execute(tabId, details, "js", callback);
       },
 
       insertCss: function(tabId, details, callback) {
-        self.tabs._execute(tabId, details, 'css', callback);
+        self.tabs._execute(tabId, details, "css", callback);
       },
 
       connect: function(tabId, connectInfo) {
         let tab = TabManager.getTab(tabId);
         let mm = tab.linkedBrowser.messageManager;
 
         let name = "";
         if (connectInfo && connectInfo.name !== null) {
--- a/toolkit/components/feeds/FeedProcessor.js
+++ b/toolkit/components/feeds/FeedProcessor.js
@@ -230,17 +230,16 @@ Feed.prototype = {
     title: ["title", "rss1:title", "atom03:title", "atom:title"],
     subtitle: ["description","dc:description","rss1:description",
                "atom03:tagline","atom:subtitle"],
     items: ["items","atom03_entries","entries"],
     id: ["atom:id","rdf:about"],
     generator: ["generator"],
     authors : ["authors"],
     contributors: ["contributors"],
-    title: ["title","rss1:title", "atom03:title","atom:title"],
     link:  [["link",strToURI],["rss1:link",strToURI]],
     categories: ["categories", "dc:subject"],
     rights: ["atom03:rights","atom:rights"],
     cloud: ["cloud"],
     image: ["image", "rss1:image", "atom:logo"],
     textInput: ["textInput", "rss1:textinput"],
     skipDays: ["skipDays"],
     skipHours: ["skipHours"],