Bug 903519 - Tenure strings that are checked for in about:memory test, r=njn
☠☠ backed out by 65e92478e09d ☠ ☠
authorSteve Fink <sfink@mozilla.com>
Fri, 22 Dec 2017 14:27:26 -0800
changeset 450648 38f4e0426bdd81c0acdce3929e3e3d81370d1273
parent 450647 71831e232df2957c9ea178986218e3d6eeef6c0b
child 450649 ec5b307a28aa6e939446eb4c19a09f8b6c7f2287
push id8531
push userryanvm@gmail.com
push dateFri, 12 Jan 2018 16:47:01 +0000
treeherdermozilla-beta@0bc627ade5a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs903519
milestone59.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 903519 - Tenure strings that are checked for in about:memory test, r=njn
toolkit/components/aboutmemory/tests/test_memoryReporters.xul
--- a/toolkit/components/aboutmemory/tests/test_memoryReporters.xul
+++ b/toolkit/components/aboutmemory/tests/test_memoryReporters.xul
@@ -68,16 +68,20 @@
   // "@)(*&".  We'll check that these strings are reported in at least
   // one of the memory reporters.
   let shortStrings = [];
   for (let i = 0; i < 10000; i++) {
     let str = (Math.random() > 0.5 ? "!" : "@") + ")(*&";
     shortStrings.push(str);
   }
 
+  // Strings in the nursery are not reported, so make sure the above test
+  // strings are tenured.
+  Components.utils.forceGC();
+
   let mySandbox = Components.utils.Sandbox(document.nodePrincipal,
                     { sandboxName: "this-is-a-sandbox-name" });
 
   function handleReportNormal(aProcess, aPath, aKind, aUnits, aAmount,
                               aDescription)
   {
     // Record the values of some notable reporters.
     if (aPath === "vsize") {