Closed Bug 1433625 Opened 2 years ago Closed 2 years ago

Implement console.createInstance().time("foo") correctly

Categories

(Core :: DOM: Core & HTML, enhancement)

58 Branch
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: baku, Assigned: baku)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The current implementation is broken and it doesn't log the correct time.
Mainly, this patch fixes the bug. But it also introduces a different logging message for time() and timeEnd(). Instead of printing the date, as Console.jsm does, here we print the monotonic timestamp from the creation of the console object.
Attachment #8946001 - Flags: review?(bugs)
Attachment #8946001 - Flags: review?(bgrinstead)
So we need this on beta too, right? Is this a regression from bug 1425463
Attachment #8946001 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #2)
> So we need this on beta too, right? Is this a regression from bug 1425463

If the change here only affects messages logged from browser chrome / jsms then I don't think we need to uplift, since we are still using Console.jsm until Bug 1430810 is resolved.
(In reply to Olli Pettay [:smaug] from comment #2)
> So we need this on beta too, right? Is this a regression from bug 1425463

Currently createInstance() is not used except for testing. We don't need to uplift it.
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/78fa743e3f11
Implement console.createInstance().time("foo") correctly, r=smaug
Attachment #8946001 - Flags: review?(bgrinstead)
https://hg.mozilla.org/mozilla-central/rev/78fa743e3f11
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.