Bug 1075211 - Remove the self hack from content/newtab/updater.js r=ttaubert
authorErik Vold <evold@mozilla.com>
Tue, 30 Sep 2014 23:42:03 +0100
changeset 208113 24c6fdc973eb840129f882eb73ccf18319d8b190
parent 208112 3e171f1759c969d126c51600c9a320034aa7cb9b
child 208114 1a550125928f835253f16272de5a2a0f9c790a80
child 208161 8292582e4c69b11e25fd29a2b20d2dd1dee44cf2
push id27576
push usercbook@mozilla.com
push dateWed, 01 Oct 2014 13:00:38 +0000
treeherderautoland@1a550125928f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs1075211
milestone35.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 1075211 - Remove the self hack from content/newtab/updater.js r=ttaubert
browser/base/content/newtab/updater.js
--- a/browser/base/content/newtab/updater.js
+++ b/browser/base/content/newtab/updater.js
@@ -15,34 +15,32 @@ let gUpdater = {
    * @param aCallback The callback to call when finished.
    */
   updateGrid: function Updater_updateGrid(aCallback) {
     let links = gLinks.getLinks().slice(0, gGrid.cells.length);
 
     // Find all sites that remain in the grid.
     let sites = this._findRemainingSites(links);
 
-    let self = this;
-
     // Remove sites that are no longer in the grid.
-    this._removeLegacySites(sites, function () {
+    this._removeLegacySites(sites, () => {
       // Freeze all site positions so that we can move their DOM nodes around
       // without any visual impact.
-      self._freezeSitePositions(sites);
+      this._freezeSitePositions(sites);
 
       // Move the sites' DOM nodes to their new position in the DOM. This will
       // have no visual effect as all the sites have been frozen and will
       // remain in their current position.
-      self._moveSiteNodes(sites);
+      this._moveSiteNodes(sites);
 
       // Now it's time to animate the sites actually moving to their new
       // positions.
-      self._rearrangeSites(sites, function () {
+      this._rearrangeSites(sites, () => {
         // Try to fill empty cells and finish.
-        self._fillEmptyCells(links, aCallback);
+        this._fillEmptyCells(links, aCallback);
 
         // Update other pages that might be open to keep them synced.
         gAllPages.update(gPage);
       });
     });
   },
 
   /**