Bug 1435296 Clean 0ms durations in stub generation r=nchevobbe a=ritu
☠☠ backed out by e9416c0efa81 ☠ ☠
authorTom Ritter <tom@mozilla.com>
Fri, 09 Feb 2018 19:31:52 -0600
changeset 454860 24cb1a9d9b2357a508cbeeb94fa5c207cd4a8064
parent 454859 9012bf881e43f794e40ef930d888660407c9ea08
child 454861 6ca6a81f6f32e1e168ceec1a2f09766d9222bfe2
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe, ritu
bugs1435296
milestone59.0
Bug 1435296 Clean 0ms durations in stub generation r=nchevobbe a=ritu If the duration was 0ms, it would not be cleaned; and thus lead to a mismatch and ultimately test failure. MozReview-Commit-ID: 1s9nMzlGT0e
devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js
--- a/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js
+++ b/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/head.js
@@ -76,17 +76,17 @@ function getCleanedPacket(key, packet) {
 
     if (res.message) {
       // Clean timeStamp on the message prop.
       res.message.timeStamp = existingPacket.message.timeStamp;
       if (res.message.timer) {
         // Clean timer properties on the message.
         // Those properties are found on console.time and console.timeEnd calls,
         // and those time can vary, which is why we need to clean them.
-        if (res.message.timer.duration) {
+        if ("duration" in res.message.timer) {
           res.message.timer.duration = existingPacket.message.timer.duration;
         }
       }
 
       if (Array.isArray(res.message.arguments)) {
         res.message.arguments = res.message.arguments.map((argument, i) => {
           if (!argument || typeof argument !== "object") {
             return argument;