Closed Bug 1499070 Opened 1 year ago Closed 1 year ago

Top-level await evaluation result have an erroneous timestamp

Categories

(DevTools :: Console, defect, P1, minor)

defect

Tracking

(firefox64 fixed)

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

**Steps to reproduce**
1. Open the console
2. In the Settings panel, ensure the "Enable timestamps" option is checked
3. Evaluate the following: `await new Promise(res => setTimeout(() => res("evaluation result"), 5000))`

**Expected results**

After 5s, the "evaluation result" message should be displayed, with a timestamp of command timestamp +~ 5s (i.e. if command timestamp is 15:00:00.000, the result should have a timestamp of something around 15:00:05.000)

**Actual results**

The timestamp of the evaluation result has a timestamp which is roughly the same as the command.

---
When sending a command to the server, a timestamp is
computed before evaluating the string, and is then
sent back to the client in the packet.
However, if top-level await, or somme :commands, the
evaluation takes more time, which means the timestamp
is now innacurate.
For those cases, we update the timestamp before sending
the packet to the client.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c645265aa5b8
Fix timestamp for evaluation result; r=Honza.
https://hg.mozilla.org/mozilla-central/rev/c645265aa5b8
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
You need to log in before you can comment on or make changes to this bug.