console time/timeEnd default parameters exhibit odd behavior |
|||||
Issue description
Chrome Version : 56.0.2924.87
URLs (if applicable) : N/A
Other browsers tested:
Safari: OK (latest + Tech Preview Release 24)
Firefox: FAIL (latest, bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=1270636)
IE: OK (Edge)
What steps will reproduce the problem?
(1) [OPTIONAL] Read up on the issue https://github.com/whatwg/console/issues/26
(2) Open up DevTools on any page
(3) Run either
console.time();
console.timeEnd(undefined);
console.log('Should see "default: XXXms"');
or
console.time(undefined);
console.timeEnd();
console.log('Should see "default: XXXms"');
in the console to see how passing `undefined` to either time/timeEnd does not trigger the default parameter outlined by the spec (link in next para).
What is the expected result?
The IDL in the console specification (https://console.spec.whatwg.org/#console-namespace) indicates that both time()/time(undefined) should behave the same along timeEnd()/timeEnd(undefined) such that a timer with label `default` gets started/stopped.
What happens instead?
It is instead clear that passing undefined in as a parameter to either of these functions actually converts it to the string "undefined" in Chromium, thus not falling back to the default timer label parameter value.
Please provide any additional information below. Attach a screenshot if
possible.
Again, more information on this and a conversation between me and Domenic Denicola can be found @ https://github.com/whatwg/console/issues/26.
,
Mar 2 2017
Tested in chrome # 56.0.2924.87 and Canary #58.0.3028.0 on win 10.0,Ubuntu 14.04 & Mac 10.12.3.Please find the screen shots for your reference. @domfarolino: Could you please let me know if i have missed anything and if possible, provide us with a OS details and expected behaviour of the issue which would help us to triage the issue further. Thanks in Advance.
,
Mar 2 2017
,
Oct 16 2017
,
Oct 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/c97d869dff00fcc55a599c454d4d98ef8c8399d8 commit c97d869dff00fcc55a599c454d4d98ef8c8399d8 Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org> Date: Tue Oct 17 00:09:26 2017 [inspector] align console.time(undefined) and console.time() with spec R=dgozman@chromium.org Bug: chromium:696798 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ida60ee5fb3e3e42d15bf6d4bad84dfcfb521b74f Reviewed-on: https://chromium-review.googlesource.com/722073 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#48617} [modify] https://crrev.com/c97d869dff00fcc55a599c454d4d98ef8c8399d8/src/inspector/v8-console.cc [modify] https://crrev.com/c97d869dff00fcc55a599c454d4d98ef8c8399d8/test/inspector/runtime/console-time-end-format-expected.txt [modify] https://crrev.com/c97d869dff00fcc55a599c454d4d98ef8c8399d8/test/inspector/runtime/console-time-end-format.js
,
Oct 17 2017
Fix will be available in one of the next Canary release this week. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ranjitkan@chromium.org
, Feb 28 2017