[Webkit-unassigned] [Bug 30962] Use Object#toString to render object name in console and object tree

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 18 01:37:09 PST 2015


Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Joseph Pecoraro <joepeck at webkit.org> ---
So we've made some improvements here. We don't parse toString's, but we do deeper analysis of object's constructor properties / native type information.

We recently improved our handling here:

  js> function Foo() {}; new Foo // Always handled this
  Foo {}

  js> Bar = function() {}; new Bar // Just made this work
  Bar {}

As for letting scripts provide a name. If we end up with "Object" given the analysis above, then we fallback to "obj.constructor.name" if it is available. A rather crude example:

  js> console.log({constructor:{name:"test"}})
  test {}


That said, neither Firebug nor FireFox's developer tools seem to do this anymore. I think they have likely moved to constructor.name or better inference as well.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150218/d4eab2bf/attachment-0002.html>

More information about the webkit-unassigned mailing list