From 9fc6b3d6deb125ae1c9c627b70b7c2c175faaa6f Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Tue, 28 May 2019 12:57:01 -0700 Subject: [PATCH 1/3] Break up spread operator. --- lighthouse-core/runner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lighthouse-core/runner.js b/lighthouse-core/runner.js index 29bdaadf0501..a490fa41371e 100644 --- a/lighthouse-core/runner.js +++ b/lighthouse-core/runner.js @@ -186,7 +186,8 @@ class Runner { // resolution. .map(entry => { return /** @type {PerformanceEntry} */ ({ - ...entry, + name: entry.name, + entryType: entry.entryType, duration: parseFloat(entry.duration.toFixed(2)), startTime: parseFloat(entry.startTime.toFixed(2)), }); From 039071320c23a449c8d447d60a1e91d490323b58 Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Tue, 28 May 2019 13:14:35 -0700 Subject: [PATCH 2/3] This is the order to make the tests happy, and I don't want to make them sad. --- lighthouse-core/runner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lighthouse-core/runner.js b/lighthouse-core/runner.js index a490fa41371e..8e24d7c031d6 100644 --- a/lighthouse-core/runner.js +++ b/lighthouse-core/runner.js @@ -186,10 +186,10 @@ class Runner { // resolution. .map(entry => { return /** @type {PerformanceEntry} */ ({ + startTime: parseFloat(entry.startTime.toFixed(2)), name: entry.name, - entryType: entry.entryType, duration: parseFloat(entry.duration.toFixed(2)), - startTime: parseFloat(entry.startTime.toFixed(2)), + entryType: entry.entryType, }); }); const runnerEntry = timingEntries.find(e => e.name === 'lh:runner:run'); From 7257c2f1b54a881c3964e639ba241d94a631302e Mon Sep 17 00:00:00 2001 From: Shane Exterkamp Date: Tue, 28 May 2019 15:31:04 -0700 Subject: [PATCH 3/3] Comment --- lighthouse-core/runner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lighthouse-core/runner.js b/lighthouse-core/runner.js index 8e24d7c031d6..3838016f2581 100644 --- a/lighthouse-core/runner.js +++ b/lighthouse-core/runner.js @@ -186,6 +186,8 @@ class Runner { // resolution. .map(entry => { return /** @type {PerformanceEntry} */ ({ + // Don't spread entry because browser PerformanceEntries can't be spread. + // https://github.com/GoogleChrome/lighthouse/issues/8638 startTime: parseFloat(entry.startTime.toFixed(2)), name: entry.name, duration: parseFloat(entry.duration.toFixed(2)),