| Summary: | Web Inspector: Improve TypedArray view in console - show non-index properties (buffer) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | graouts, inspector-bugzilla-changes, jonowells, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
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.
|
* 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.