Bug 742782 - [New Tab Page] Error: aCallback is not defined; r=dietrich
authorTim Taubert <tim.taubert@gmx.de>
Fri, 06 Apr 2012 00:33:47 +0200
changeset 94543 7e22d83d5c6ce2124f2c8363144230c9a1f3d2c2
parent 94542 5d654a428c971c877dc9bf72727f4c47004e5e3e
child 94544 cafe030aca8aa6d1a03fe9749644af10e5b7ddf8
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdietrich
bugs742782
milestone14.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 742782 - [New Tab Page] Error: aCallback is not defined; r=dietrich
browser/base/content/newtab/sites.js
--- a/browser/base/content/newtab/sites.js
+++ b/browser/base/content/newtab/sites.js
@@ -78,20 +78,17 @@ Site.prototype = {
     return gPinnedLinks.isPinned(this._link);
   },
 
   /**
    * Blocks the site (removes it from the grid) and calls the given callback
    * when done.
    */
   block: function Site_block() {
-    if (gBlockedLinks.isBlocked(this._link)) {
-      if (aCallback)
-        aCallback();
-    } else {
+    if (!gBlockedLinks.isBlocked(this._link)) {
       gBlockedLinks.block(this._link);
       gUpdater.updateGrid();
     }
   },
 
   /**
    * Gets the DOM node specified by the given query selector.
    * @param aSelector The query selector.