New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 675815 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 696805
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

console.log "%s" does not call toString

Reported by jsnmot...@gmail.com, Dec 20 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36

Steps to reproduce the problem:
```js
console.log("%s", {toString:function() { return "foo"; }})
```

What is the expected behavior?
print "foo" to console

What went wrong?
Chromium prints "Object".  The WHATWG spec and other browsers seem to do the right thing.  See https://github.com/whatwg/console/issues/80 for a discussion on the matter

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 55.0.2883.75  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 24.0 r0
 

Comment 1 by tkent@chromium.org, Dec 20 2016

Components: Platform>DevTools
Components: -Blink>JavaScript

Comment 3 by hdodda@chromium.org, Dec 21 2016

Cc: hdodda@chromium.org
Labels: M-57
Status: Untriaged (was: Unconfirmed)
Tested on Mac 10.12.2 using chrome canary M57 #57.0.2957.0 and chrome stable M55 #55.0.2883.87 and issue is reproduced.

Issue is seem from M30 and hence it is a non-regression issue.

Marking it as untriaged , so that someone could address this.

Thanks!

Comment 4 by hdodda@chromium.org, Dec 21 2016

Labels: OS-Linux OS-Windows
Issue is also seen on windows 10 and ubuntu 14.04.
Owner: l...@chromium.org
Status: Assigned (was: Untriaged)

Comment 6 by l...@chromium.org, Dec 5 2017

Mergedinto: 696805
Status: Duplicate (was: Assigned)

Sign in to add a comment