New issue
Advanced search Search tips

Issue 700624 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

console.count() default parameters exhibit odd behavior

Project Member Reported by domfarolino@gmail.com, Mar 11 2017

Issue description

Chrome Version       : 56.0.2924.87
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari: FAIL
    Firefox: FAIL
       Edge: OK
         IE: N/A

What steps will reproduce the problem?
(1) [OPTIONAL] Read up on the issue https://github.com/whatwg/console/issues/88
(2) Open up DevTools on any page
(3) Run:

console.count()
console.count(undefined)
console.count("default")

or equally, the code in this bin: https://jsbin.com/leduripolo/1/edit?js,console

What is the expected result?

The expected result is:

> default: 1
> default: 2
> default: 3

namely that all three calls increment the same internal counter.

What happens instead?

Instead, the default parameter defined in console IDL (https://console.spec.whatwg.org/#console-namespace) does not behave properly and the output is:

> : 1
> undefined: 1
> default: 1

The spec just changed (the day this issue was opened) to have count()'s default parameter equal to the string "default" instead of "", but even before the spec change console.count(undefined) for some reason converted undefined => "undefined" instead of using the default parameter.

Please provide any additional information below. Attach a screenshot if
possible.

This is somewhat related to https://bugs.chromium.org/p/chromium/issues/detail?id=696798.
 
Components: Platform>DevTools
Labels: -Pri-3 M-59 OS-Linux OS-Mac OS-Windows Pri-2
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Mac 10.12.3, Win-10 and Ubuntu 14.04 using chrome reported version #56.0.2924.87 and latest canary #59.0.3040.0.

This is a non-regression issue as it is observed from M30 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Owner: l...@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/135e5a98873351552d01931c97f03046fc7a566a

commit 135e5a98873351552d01931c97f03046fc7a566a
Author: Erik Luo <luoe@chromium.org>
Date: Thu Nov 30 20:51:06 2017

Skip tests for console.time/count related V8 changes

Bug:  700624 ,  727514 
Change-Id: I54f08aa19e76f505303b9314fa56d7deb3fcb348
Reviewed-on: https://chromium-review.googlesource.com/794490
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520672}
[modify] https://crrev.com/135e5a98873351552d01931c97f03046fc7a566a/third_party/WebKit/LayoutTests/TestExpectations

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 1 2017

Project Member

Comment 5 by bugdroid1@chromium.org, Dec 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/d9806cec94d78a5b95333d1930721967f22d22c0

commit d9806cec94d78a5b95333d1930721967f22d22c0
Author: Erik Luo <luoe@chromium.org>
Date: Fri Dec 01 20:17:20 2017

DevTools: also use default label for console.count

Aligns console.count() behavior with spec, which says the default label
should be "default" when the label provided is not defined.

Bug:  chromium:700624 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie58af210d300ef3151082b23187dd18e356f5de8
Reviewed-on: https://chromium-review.googlesource.com/780620
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49804}
[modify] https://crrev.com/d9806cec94d78a5b95333d1930721967f22d22c0/src/inspector/v8-console.cc
[modify] https://crrev.com/d9806cec94d78a5b95333d1930721967f22d22c0/test/inspector/runtime/console-methods-expected.txt
[modify] https://crrev.com/d9806cec94d78a5b95333d1930721967f22d22c0/test/inspector/runtime/console-methods.js
[modify] https://crrev.com/d9806cec94d78a5b95333d1930721967f22d22c0/test/inspector/runtime/regression-736302-expected.txt

Project Member

Comment 6 by bugdroid1@chromium.org, Dec 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/449d25524a82d1d93999ed2dcf5dbb3e2e926080

commit 449d25524a82d1d93999ed2dcf5dbb3e2e926080
Author: Erik Luo <luoe@chromium.org>
Date: Mon Dec 04 19:51:53 2017

DevTools: rebase expectations after V8 console time/count changes

Relevant V8 CLs have landed in this autoroll:
https://chromium-review.googlesource.com/c/chromium/src/+/805157

Bug:  700624 ,  727514 
Change-Id: I73392015ee47bb79499cc7ee8b447673c00387da
Reviewed-on: https://chromium-review.googlesource.com/806258
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521418}
[modify] https://crrev.com/449d25524a82d1d93999ed2dcf5dbb3e2e926080/third_party/WebKit/LayoutTests/TestExpectations

Comment 7 by l...@chromium.org, Dec 4 2017

Status: Fixed (was: Assigned)

Sign in to add a comment