[Webkit-unassigned] [Bug 143650] Web Inspector: ObjectTree Property Path doesn't work for objects logged via console.log

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 13 01:44:05 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=143650

--- Comment #2 from Joseph Pecoraro <joepeck at webkit.org> ---
(In reply to comment #0)
> it returns bogus paths, using `this` as the root expression.

This is currently expected behavior. "this" is the default when we don't know the value.

Unless the value is a $n value (or the special case of top level names in the Scope Chain Sidebar) we don't know how to reference the top level object.

Take this for example:

    console.log([a:1});
    console.log(functionReturningObject());

There is no reference to those objects. So we say "this".

However for:

    js> obj = {a:1}; dir(obj)
    {a: 1} = $1

In this case, we know the root level object is $1 and can use that.

If someone does:

    console.log(event);

By the time the event has passed, if we showed "event.type" as the property path that could be misleading if "event" no longer refers to the event at the time it was logged.

--

- Is there a specific case you have in mind that you think we should improve?
- Do you think there would be a better default name then "this"?

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


More information about the webkit-unassigned mailing list