Bug 751509 - Don't assert that about:memory percentages are less than 100%. r=njn
authorJustin Lebar <justin.lebar@gmail.com>
Fri, 04 May 2012 14:38:06 -0400
changeset 93209 0528b55a2616302eeb5b2522adedd07d0ef16c7c
parent 93208 4273d01bfbb19f81fb7b83ac9696c2a04ba4a12c
child 93210 ac9db6e7b6b823b5c8e49f5806b7824888d6c638
push id22616
push userMs2ger@gmail.com
push dateSat, 05 May 2012 08:59:35 +0000
treeherdermozilla-central@ea4c62f4c063 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs751509
milestone15.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 751509 - Don't assert that about:memory percentages are less than 100%. r=njn
toolkit/components/aboutmemory/content/aboutMemory.js
toolkit/components/aboutmemory/tests/test_aboutmemory.xul
--- a/toolkit/components/aboutmemory/content/aboutMemory.js
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js
@@ -1410,17 +1410,17 @@ OtherReport.prototype = {
   },
 
   isInvalid: function() {
     let n = this._amount;
     switch (this._units) {
       case UNITS_BYTES:
       case UNITS_COUNT:
       case UNITS_COUNT_CUMULATIVE: return n < 0;
-      case UNITS_PERCENTAGE:       return !(0 <= n && n <= 10000);
+      case UNITS_PERCENTAGE:       return n < 0; /* percentages may be greater than 100% */
       default:
         assert(false, "bad units in OtherReport.isInvalid");
     }
   }
 };
 
 OtherReport.compare = function(a, b) {
   return a._unsafePath < b._unsafePath ? -1 :
--- a/toolkit/components/aboutmemory/tests/test_aboutmemory.xul
+++ b/toolkit/components/aboutmemory/tests/test_aboutmemory.xul
@@ -302,17 +302,16 @@ WARNING: the following values are negati
  explicit/(2 tiny)\n\
  explicit/(2 tiny)/neg1\n\
  explicit/(2 tiny)/heap-unclassified\n\
  other1\n\
  other2\n\
  other3\n\
  other4\n\
  other5\n\
- other6\n\
 This indicates a defect in one or more memory reporters.  The invalid values are highlighted.\n\
 \n\
 Explicit Allocations\n\
 98.00 MB (100.0%) -- explicit\n\
 ├──150.00 MB (153.06%) -- js [?!]\n\
 │  └──150.00 MB (153.06%) -- compartment(http://too-big.com/) [?!]\n\
 │     └──150.00 MB (153.06%) ── stuff [?!]\n\
 ├───5.00 MB (05.10%) ── ok\n\
@@ -322,17 +321,17 @@ 98.00 MB (100.0%) -- explicit\n\
 \n\
 Other Measurements\n\
  100.00 MB ── heap-allocated\n\
   -0.00 MB ── other1 [?!]\n\
 -222.00 MB ── other2 [?!]\n\
       -333 ── other3 [?!]\n\
       -444 ── other4 [?!]\n\
     -5.55% ── other5 [?!]\n\
-   666.66% ── other6 [?!]\n\
+   666.66% ── other6\n\
 \n\
 5th Process\n\
 \n\
 WARNING: the following values are negative or unreasonably large.\n\
  explicit/(3 tiny)/a/neg2\n\
  explicit/(3 tiny)/a/neg1\n\
  explicit/(3 tiny)/b\n\
  explicit/(3 tiny)/b/c\n\
@@ -453,17 +452,16 @@ WARNING: the following values are negati
  explicit/js/compartment(http://too-big.com/)/stuff\n\
  explicit/neg1\n\
  explicit/heap-unclassified\n\
  other1\n\
  other2\n\
  other3\n\
  other4\n\
  other5\n\
- other6\n\
 This indicates a defect in one or more memory reporters.  The invalid values are highlighted.\n\
 \n\
 Explicit Allocations\n\
 102,760,448 B (100.0%) -- explicit\n\
 ├──157,286,400 B (153.06%) -- js [?!]\n\
 │  └──157,286,400 B (153.06%) -- compartment(http://too-big.com/) [?!]\n\
 │     └──157,286,400 B (153.06%) ── stuff [?!]\n\
 ├────5,242,880 B (05.10%) ── ok\n\
@@ -472,17 +470,17 @@ 102,760,448 B (100.0%) -- explicit\n\
 \n\
 Other Measurements\n\
  104,857,600 B ── heap-allocated\n\
         -111 B ── other1 [?!]\n\
 -232,783,872 B ── other2 [?!]\n\
           -333 ── other3 [?!]\n\
           -444 ── other4 [?!]\n\
         -5.55% ── other5 [?!]\n\
-       666.66% ── other6 [?!]\n\
+       666.66% ── other6\n\
 \n\
 5th Process\n\
 \n\
 WARNING: the following values are negative or unreasonably large.\n\
  explicit/a/neg2\n\
  explicit/a/neg1\n\
  explicit/b\n\
  explicit/b/c\n\