Bug 1410072 - browser/base/content/test/performance tests should not modify startupRecorder data in order to pass test-verify, r=johannh.
authorFlorian Quèze <florian@queze.net>
Thu, 04 Jan 2018 22:23:48 +0100
changeset 449673 eaf8243e6e3346ea7bbb4305aee4d44da0d0c8e3
parent 449672 1762939d90bb34bcb5f50a1e735bc1eb2bc17d7b
child 449674 ea7269f28ea02ca6e6d0aad57afe3f8e6977e8fe
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1410072
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 1410072 - browser/base/content/test/performance tests should not modify startupRecorder data in order to pass test-verify, r=johannh.
browser/base/content/test/performance/browser_startup.js
browser/base/content/test/performance/browser_startup_images.js
--- a/browser/base/content/test/performance/browser_startup.js
+++ b/browser/base/content/test/performance/browser_startup.js
@@ -148,17 +148,17 @@ add_task(async function() {
     return;
   }
 
   let startupRecorder = Cc["@mozilla.org/test/startuprecorder;1"].getService().wrappedJSObject;
   await startupRecorder.done;
 
   let loader = Cc["@mozilla.org/moz/jsloader;1"].getService(Ci.xpcIJSModuleLoader);
   let componentStacks = new Map();
-  let data = startupRecorder.data.code;
+  let data = Cu.cloneInto(startupRecorder.data.code, {});
   // Keep only the file name for components, as the path is an absolute file
   // URL rather than a resource:// URL like for modules.
   for (let phase in data) {
     data[phase].components =
       data[phase].components.map(uri => {
         let fileName = uri.replace(/.*\//, "");
         componentStacks.set(fileName, loader.getComponentLoadStack(uri));
         return fileName;
--- a/browser/base/content/test/performance/browser_startup_images.js
+++ b/browser/base/content/test/performance/browser_startup_images.js
@@ -88,17 +88,17 @@ const whitelist = [
 add_task(async function() {
   if (!AppConstants.DEBUG) {
     ok(false, "You need to run this test on a debug build.");
   }
 
   let startupRecorder = Cc["@mozilla.org/test/startuprecorder;1"].getService().wrappedJSObject;
   await startupRecorder.done;
 
-  let data = startupRecorder.data.images;
+  let data = Cu.cloneInto(startupRecorder.data.images, {});
   let filteredWhitelist = whitelist.filter(el => {
     return el.platforms.includes(AppConstants.platform);
   });
 
   let loadedImages = data["image-loading"];
   let shownImages = data["image-drawing"];
 
   for (let loaded of loadedImages.values()) {