Reland of DevTools: merge array formatting logic
This CL makes array formatting consistent. ConsoleViewMessage lets
RemoteObjectPreviewFormatter checks for arrays and handle them, showing gaps
('undefined x n') only when the preview is guaranteed to hold all render-able
properties.
The original version of this CL was reverted:
https://codereview.chromium.org/2566443004/
BUG=666882
Committed: https://crrev.com/05dd76a462c939c4dcdcce29cf29f10943ace9f9
Cr-Commit-Position: refs/heads/master@{#441212}
Description was changed from
==========
wip
BUG=
==========
to
==========
Reland of DevTools: merge array formatting logic
This CL makes array formatting consistent. ConsoleViewMessage lets
RemoteObjectPreviewFormatter checks for arrays and handle them, showing gaps
('undefined x n') only when the preview is guaranteed to hold all render-able
properties.
BUG=666882
==========
luoe
Description was changed from ========== Reland of DevTools: merge array formatting logic This CL makes ...
Description was changed from
==========
Reland of DevTools: merge array formatting logic
This CL makes array formatting consistent. ConsoleViewMessage lets
RemoteObjectPreviewFormatter checks for arrays and handle them, showing gaps
('undefined x n') only when the preview is guaranteed to hold all render-able
properties.
BUG=666882
==========
to
==========
Reland of DevTools: merge array formatting logic
This CL makes array formatting consistent. ConsoleViewMessage lets
RemoteObjectPreviewFormatter checks for arrays and handle them, showing gaps
('undefined x n') only when the preview is guaranteed to hold all render-able
properties.
The original version of this CL was reverted:
https://codereview.chromium.org/2566443004/
BUG=666882
==========
luoe
The CQ bit was checked by luoe@chromium.org to run a CQ dry run
The differences between this CL and the reverted one are:
- Original CL: eval'ing a long array would not show any preview. This CL: all
branches try to show a preview, so arrays use formatParameterAsObject()
- Gaps are not shown when the preview overflowed. Since preview properties are
not guaranteed to be in any order, we cannot reliably show a gap unless we know
all the properties are there.
Please take a look
dgozman
https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (left): https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#oldcode631 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:631: array.getAllProperties(false, printArrayResult.bind(this)); Let's investigate how to trigger this, because ...
3 years, 12 months ago
(2016-12-28 00:40:37 UTC)
#7
https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js (left): https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js#oldcode631 third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:631: array.getAllProperties(false, printArrayResult.bind(this)); It turns out that this does get ...
3 years, 11 months ago
(2016-12-28 22:21:56 UTC)
#8
https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Sour...
File third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
(left):
https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js:631:
array.getAllProperties(false, printArrayResult.bind(this));
It turns out that this does get triggered in a strange way!
Example 1:
var arr = [1];
console.dirxml(arr);
arr.push(2);
Actual result: [1]
dirxml() leads to the async getAllProperties() call, and the
printArrayResult(properties) is invoked with 2 index properties: Prop{name: "0",
value: 1} and Prop{name: "1", value: 2}. The reason why we don't see [1, 2] is
that we're using the old remote object on line 669, and array.arrayLength()
returns 1. If we want to see [1, 2], we should have been searching the results
for the "length" property and using that value as the arrayLength.
This behavior seems safe to remove if we want to make both formats consistent.
3 years, 11 months ago
(2017-01-03 18:38:49 UTC)
#9
lgtm
https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/inspector/console/console-object-preview-expected.txt
(right):
https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/inspector/console/console-object-preview-expected.txt:45:
console-object-preview.html:45 [undefined × 50, 50, undefined × 99]
console-message > source-code > console-message-url devtools-link >
console-message-text > console-view-object-properties-section object-value-array
source-code > tree-outline-disclosure tree-outline-disclosure-hide-overflow >
tree-outline source-code object-properties-section > parent
object-properties-section-root-element > selection fill > console-object-preview
> object-value-undefined > object-value-number > object-value-undefined >
children
Let's add a test for an array which has defined properties at indices 57*x+32
for x in [0..99].
3 years, 11 months ago
(2017-01-03 19:24:36 UTC)
#10
https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/inspector/console/console-object-preview-expected.txt
(right):
https://codereview.chromium.org/2596133002/diff/60001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/inspector/console/console-object-preview-expected.txt:45:
console-object-preview.html:45 [undefined × 50, 50, undefined × 99]
console-message > source-code > console-message-url devtools-link >
console-message-text > console-view-object-properties-section object-value-array
source-code > tree-outline-disclosure tree-outline-disclosure-hide-overflow >
tree-outline source-code object-properties-section > parent
object-properties-section-root-element > selection fill > console-object-preview
> object-value-undefined > object-value-number > object-value-undefined >
children
On 2017/01/03 18:38:49, dgozman wrote:
> Let's add a test for an array which has defined properties at indices 57*x+32
> for x in [0..99].
Done.
luoe
The CQ bit was checked by luoe@chromium.org to run a CQ dry run
3 years, 11 months ago
(2017-01-03 19:25:01 UTC)
#11
CQ is committing da patch. Bot data: {"patchset_id": 100001, "attempt_start_ts": 1483478917498500, "parent_rev": "ec319476abc11398ae5c13b12684964f145e8454", "commit_rev": "a85c6636acc96b4f97f52551c3c22a65197f0528"}
3 years, 11 months ago
(2017-01-03 21:33:30 UTC)
#18
CQ is committing da patch.
Bot data: {"patchset_id": 100001, "attempt_start_ts": 1483478917498500,
"parent_rev": "ec319476abc11398ae5c13b12684964f145e8454", "commit_rev":
"a85c6636acc96b4f97f52551c3c22a65197f0528"}
commit-bot: I haz the power
Description was changed from ========== Reland of DevTools: merge array formatting logic This CL makes ...
3 years, 11 months ago
(2017-01-03 21:33:59 UTC)
#19
Message was sent while issue was closed.
Description was changed from
==========
Reland of DevTools: merge array formatting logic
This CL makes array formatting consistent. ConsoleViewMessage lets
RemoteObjectPreviewFormatter checks for arrays and handle them, showing gaps
('undefined x n') only when the preview is guaranteed to hold all render-able
properties.
The original version of this CL was reverted:
https://codereview.chromium.org/2566443004/
BUG=666882
==========
to
==========
Reland of DevTools: merge array formatting logic
This CL makes array formatting consistent. ConsoleViewMessage lets
RemoteObjectPreviewFormatter checks for arrays and handle them, showing gaps
('undefined x n') only when the preview is guaranteed to hold all render-able
properties.
The original version of this CL was reverted:
https://codereview.chromium.org/2566443004/
BUG=666882
Review-Url: https://codereview.chromium.org/2596133002
==========
commit-bot: I haz the power
Committed patchset #6 (id:100001)
3 years, 11 months ago
(2017-01-03 21:34:04 UTC)
#20
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
commit-bot: I haz the power
Description was changed from ========== Reland of DevTools: merge array formatting logic This CL makes ...
3 years, 11 months ago
(2017-01-03 21:36:58 UTC)
#21
Message was sent while issue was closed.
Description was changed from
==========
Reland of DevTools: merge array formatting logic
This CL makes array formatting consistent. ConsoleViewMessage lets
RemoteObjectPreviewFormatter checks for arrays and handle them, showing gaps
('undefined x n') only when the preview is guaranteed to hold all render-able
properties.
The original version of this CL was reverted:
https://codereview.chromium.org/2566443004/
BUG=666882
Review-Url: https://codereview.chromium.org/2596133002
==========
to
==========
Reland of DevTools: merge array formatting logic
This CL makes array formatting consistent. ConsoleViewMessage lets
RemoteObjectPreviewFormatter checks for arrays and handle them, showing gaps
('undefined x n') only when the preview is guaranteed to hold all render-able
properties.
The original version of this CL was reverted:
https://codereview.chromium.org/2566443004/
BUG=666882
Committed: https://crrev.com/05dd76a462c939c4dcdcce29cf29f10943ace9f9
Cr-Commit-Position: refs/heads/master@{#441212}
==========
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/05dd76a462c939c4dcdcce29cf29f10943ace9f9 Cr-Commit-Position: refs/heads/master@{#441212}
3 years, 11 months ago
(2017-01-03 21:36:59 UTC)
#22
Issue 2596133002: Reland of DevTools: merge array formatting logic
(Closed)
Created 4 years ago by luoe
Modified 3 years, 11 months ago
Reviewers: lushnikov, dgozman
Base URL:
Comments: 4