WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
145190
Web Inspector: Improve TypedArray view in console - show non-index properties (buffer)
https://bugs.webkit.org/show_bug.cgi?id=145190
Summary
Web Inspector: Improve TypedArray view in console - show non-index properties...
Joseph Pecoraro
Reported
2015-05-19 15:50:23 PDT
* SUMMARY Improve TypedArray view in console - show non-index properties (buffer, byteLength, byteOffset). * TEST var buffer = new ArrayBuffer(12); var dataView = new DataView(buffer); var int8View = new Int8Array(buffer); console.log(buffer); console.log(dataView); console.log(int8View); // <--- We treat the TypedArrays, like Int8Array here, as arrays. In previews we may ignore non-index properties. But even when expanding (console.dir(int8View)) we only show the indices and don't show the buffer/byteLength/byteOffset value properties which may be useful. * NOTES - InjectedScriptSource.js possible changes to mark as non-lossy. // For arrays, only allow indexes. Mark as lossy if there are non-obvious value properties. if (this.subtype === "array" && !isUInt32(name)) { if (name !== "length" && name !== "constructor" && descriptor.isOwn && !descriptor.symbol && "value" in descriptor && typeof descriptor.value !== "function") preview.lossless = false; continue; } - Would still require frontend changes for an ObjectTree for "array" subtype to also show non-index properties. Perhaps in a new section beneath the #s, but before the Prototype.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-05-19 15:51:19 PDT
<
rdar://problem/21028103
>
Joseph Pecoraro
Comment 2
2015-05-19 15:55:53 PDT
Another more basic example: var arr = [1, 2, 3]; arr.myProperty = "test"; console.dir(arr); // resulting object tree never shows the "myProperty" Technically this is a regression. The old object trees would show this property.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug