Function values missing from console logged object
Reported by
oliverj...@gmail.com,
Sep 8 2016
|
|||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Steps to reproduce the problem:
1. console.log({ foo: 1, bar: function () {} })
What is the expected behavior?
The foo *and* bar function should be displayed in the console.
What went wrong?
The bar property is not displayed.
Did this work before? N/A
Chrome version: 52.0.2743.116 Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 22.0 r0
This lead me to believe an object didn't have a value I thought it had. Very confusing. Upon expanding the object, you can see the values, but this is misleading.
,
Sep 30 2016
,
Nov 2 2016
I found a related bug from last year in which a decision was made to exclude functions from previews: https://bugs.chromium.org/p/chromium/issues/detail?id=339099 From that discussion, it sounds to me that the change was made to prioritize showing only the properties that were likely to change after capturing, since the preview is just a snapshot. Functions usually don't change, so they were removed along with proto props in that other bug. If this is misleading, we could do Paul's proposal and sort functions to be shown last when there is space available. Or, we could just add an ellipsis ", ..." into the preview to indicate that other things are not being shown. WDYT?
,
Nov 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4713c97d015f1010216edb6b785e0707b0c72dc7 commit 4713c97d015f1010216edb6b785e0707b0c72dc7 Author: luoe <luoe@chromium.org> Date: Thu Nov 10 21:06:31 2016 DevTools: sort functions last in object previews In the near future, injected script source will add functions to object previews. This CL is made in preparation for that change. BUG= 645053 Review-Url: https://codereview.chromium.org/2486953002 Cr-Commit-Position: refs/heads/master@{#431348} [modify] https://crrev.com/4713c97d015f1010216edb6b785e0707b0c72dc7/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
,
Dec 2 2016
,
Dec 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f966eb231dae371443c32cebab8b803f84b83f4b commit f966eb231dae371443c32cebab8b803f84b83f4b Author: luoe <luoe@chromium.org> Date: Wed Dec 07 18:28:48 2016 DevTools: update test expectations before V8 roll for console previews BUG= 645053 Review-Url: https://codereview.chromium.org/2555983002 Cr-Commit-Position: refs/heads/master@{#437012} [modify] https://crrev.com/f966eb231dae371443c32cebab8b803f84b83f4b/third_party/WebKit/LayoutTests/TestExpectations
,
Dec 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4facd77b06c7baa20c963e6437246ca72e0584fe commit 4facd77b06c7baa20c963e6437246ca72e0584fe Author: luoe <luoe@chromium.org> Date: Thu Dec 08 22:37:36 2016 Rebaseline after V8 roll for consolobject preview changes Corresponding expectation CL: https://codereview.chromium.org/2555983002/ BUG= 645053 Review-Url: https://codereview.chromium.org/2562793002 Cr-Commit-Position: refs/heads/master@{#437370} [modify] https://crrev.com/4facd77b06c7baa20c963e6437246ca72e0584fe/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/4facd77b06c7baa20c963e6437246ca72e0584fe/third_party/WebKit/LayoutTests/inspector/console/console-format-collections-expected.txt [modify] https://crrev.com/4facd77b06c7baa20c963e6437246ca72e0584fe/third_party/WebKit/LayoutTests/inspector/console/console-format-expected.txt [modify] https://crrev.com/4facd77b06c7baa20c963e6437246ca72e0584fe/third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-expected.txt [modify] https://crrev.com/4facd77b06c7baa20c963e6437246ca72e0584fe/third_party/WebKit/LayoutTests/inspector/console/console-tainted-globals-expected.txt
,
Dec 9 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by paulir...@chromium.org
, Sep 12 2016Owner: l...@chromium.org
Status: Assigned (was: Unconfirmed)
13.9 KB
13.9 KB View Download
16.6 KB
16.6 KB View Download