Bug 741062. (Av1) Port |Bug 741064 - treeView.js: "function PTV__buildVisibleSection does not always return a value"| to SeaMonkey. r=Neil a=Callek
authorSerge Gautherie <sgautherie.bz@free.fr>
Sun, 01 Apr 2012 09:30:00 -0400
changeset 11774 e062cb10015c4ca3d71a178c4b86f9b3a68d0cee
parent 11773 653d3b0d33ae95dbd6f062b19d87db8a93882ce5
child 11775 8db3dc572a19f97b5e837b191db9a76044883766
push id6
push userbienvenu@nventure.com
push dateWed, 16 May 2012 22:24:51 +0000
treeherdertry-comm-central@ac395aea3008 [default view] [failures only]
reviewersNeil, Callek
bugs741062, 741064
Bug 741062. (Av1) Port |Bug 741064 - treeView.js: "function PTV__buildVisibleSection does not always return a value"| to SeaMonkey. r=Neil a=Callek
suite/common/history/treeView.js
suite/common/places/treeView.js
--- a/suite/common/history/treeView.js
+++ b/suite/common/history/treeView.js
@@ -268,17 +268,17 @@ PlacesTreeView.prototype = {
    *
    * @return the number of rows which were inserted.
    */
   _buildVisibleSection:
   function PTV__buildVisibleSection(aContainer, aFirstChildRow, aToOpen)
   {
     // There's nothing to do if the container is closed.
     if (!aContainer.containerOpen)
-      return;
+      return 0;
 
     // Inserting the new elements into the rows array in one shot (by
     // Array.concat) is faster than resizing the array (by splice) on each loop
     // iteration.
     var cc = aContainer.childCount;
     var newElements = new Array(cc);
     this._rows = this._rows.splice(0, aFirstChildRow)
                            .concat(newElements, this._rows);
--- a/suite/common/places/treeView.js
+++ b/suite/common/places/treeView.js
@@ -283,17 +283,17 @@ PlacesTreeView.prototype = {
    *
    * @return the number of rows which were inserted.
    */
   _buildVisibleSection:
   function PTV__buildVisibleSection(aContainer, aFirstChildRow, aToOpen)
   {
     // There's nothing to do if the container is closed.
     if (!aContainer.containerOpen)
-      return;
+      return 0;
 
     // Inserting the new elements into the rows array in one shot (by
     // Array.concat) is faster than resizing the array (by splice) on each loop
     // iteration.
     let cc = aContainer.childCount;
     let newElements = new Array(cc);
     this._rows = this._rows.splice(0, aFirstChildRow)
                      .concat(newElements, this._rows);