<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Web Inspector: Improve TypedArray view in console - show non-index properties (buffer)"
href="https://bugs.webkit.org/show_bug.cgi?id=145190">145190</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Web Inspector: Improve TypedArray view in console - show non-index properties (buffer)
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>528+ (Nightly build)
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Web Inspector
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>joepeck@webkit.org
</td>
</tr>
<tr>
<th>CC</th>
<td>graouts@webkit.org, joepeck@webkit.org, jonowells@apple.com, mattbaker@apple.com, nvasilyev@apple.com, timothy@apple.com, webkit-bug-importer@group.apple.com
</td>
</tr></table>
<p>
<div>
<pre>* 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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>