Bug 1008029 - Fix intermittent browser_newtab_update.js failures r=Gijs
authorTim Taubert <ttaubert@mozilla.com>
Fri, 14 Nov 2014 20:21:17 +0100
changeset 248224 6776f88e29be3ec4574889a8c3701bdda6d2c02d
parent 248223 afbe988c3beaacef4aa792f6f8e8ea259c156e1b
child 248225 046d6ecc36ba5883b365546113df7086e0acf0cb
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1008029
milestone37.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 1008029 - Fix intermittent browser_newtab_update.js failures r=Gijs
browser/base/content/test/newtab/browser.ini
toolkit/modules/NewTabUtils.jsm
--- a/browser/base/content/test/newtab/browser.ini
+++ b/browser/base/content/test/newtab/browser.ini
@@ -40,9 +40,8 @@ support-files =
   searchEngine2xLogo.xml
   searchEngine1x2xLogo.xml
   ../general/searchSuggestionEngine.xml
   ../general/searchSuggestionEngine.sjs
 [browser_newtab_sponsored_icon_click.js]
 [browser_newtab_undo.js]
 [browser_newtab_unpin.js]
 [browser_newtab_update.js]
-skip-if = true # Bug 1008029
--- a/toolkit/modules/NewTabUtils.jsm
+++ b/toolkit/modules/NewTabUtils.jsm
@@ -272,21 +272,21 @@ let AllPages = {
   },
 
   /**
    * Updates all currently active pages but the given one.
    * @param aExceptPage The page to exclude from updating.
    * @param aReason The reason for updating all pages.
    */
   update(aExceptPage, aReason = "") {
-    this._pages.forEach(function (aPage) {
-      if (aExceptPage != aPage) {
-        aPage.update(aReason);
+    for (let page of this._pages.slice()) {
+      if (aExceptPage != page) {
+        page.update(aReason);
       }
-    });
+    }
   },
 
   /**
    * Implements the nsIObserver interface to get notified when the preference
    * value changes or when a new copy of a page thumbnail is available.
    */
   observe: function AllPages_observe(aSubject, aTopic, aData) {
     if (aTopic == "nsPref:changed") {