The default bug view has changed. See this FAQ.

Display ArrayBuffer objects like old console

VERIFIED FIXED in Firefox 52

Status

()

Firefox
Developer Tools: Shared Components
P3
normal
VERIFIED FIXED
5 months ago
2 months ago

People

(Reporter: ntim, Assigned: nchevobbe)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 52
Points:
---

Firefox Tracking Flags

(firefox52 verified)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

5 months ago
var ab = new ArrayBuffer(10); ab;

should show:
ArrayBuffer { byteLength: 10 }

not just:
ArrayBuffer { }

Same goes for the JSON object that should show all 3 functions (parse,stringify , toSource).
(Reporter)

Updated

5 months ago
Blocks: 1308219
Priority: -- → P3
Comment hidden (mozreview-request)
(Assignee)

Comment 2

5 months ago
TRY run for the patch looks good https://treeherder.mozilla.org/#/jobs?repo=try&revision=16bcce47ed7043521f3876e6db609e788e480823 

> Same goes for the JSON object that should show all 3 functions (parse,stringify , toSource).

I think this one deserve its own bug. We currently do not have those data in the grip :

```
{
  "type": "object",
  "actor": "server1.conn1.child1/obj194",
  "class": "JSON",
  "extensible": true,
  "frozen": false,
  "sealed": false,
  "ownPropertyLength": 3,
  "preview": {
    "kind": "Object",
    "ownProperties": {},
    "ownPropertiesLength": 3,
    "safeGetterValues": {}
  }
}
```

The thing that's weird is that they're counted in ownPropertyLength. My guess is that's because we are using Object.getOwnPropertyNames (http://searchfox.org/mozilla-central/source/devtools/server/actors/object.js#111 ), which returns non-enumerable properties, but when populating the preview, we exclude non-enumerable properties (http://searchfox.org/mozilla-central/source/devtools/server/actors/object.js#1448 , second argument is `onlyEnumerable`)

In the old console, it's already broken ( "JSON { , 3 moreā€¦ }" is displayed ), because we try to iterate with ownPropertyLength.

So this could be handled server-side, but I think there are some good reasons those are not sent in the grip.
FWIW, those are not shown in Chrome either ( `JSON {Symbol(Symbol.toStringTag): "JSON"}`).

Comment 3

5 months ago
mozreview-review
Comment on attachment 8809085 [details]
Bug 1316266 - Handle grip `safeGetterValues` property in Grip Reps;

https://reviewboard.mozilla.org/r/91734/#review91920

R+ assuming Try is green

Thanks Nicolas!
Honza
Attachment #8809085 - Flags: review?(odvarko) → review+

Comment 4

5 months ago
Pushed by chevobbe.nicolas@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1f58f59c9003
Handle grip `safeGetterValues` property in Grip Reps; r=Honza
(Assignee)

Comment 5

5 months ago
TRY was good ( https://treeherder.mozilla.org/#/jobs?repo=try&revision=16bcce47ed7043521f3876e6db609e788e480823  ) so I pushed to autoland.

Tim, do you think we should file a new bug for adding the non-enumerable properties in the grip ?
(Reporter)

Comment 6

5 months ago
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #5)
> TRY was good (
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=16bcce47ed7043521f3876e6db609e788e480823  ) so I
> pushed to autoland.
> 
> Tim, do you think we should file a new bug for adding the non-enumerable
> properties in the grip ?

Filed bug 1316579

Comment 7

4 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/1f58f59c9003
Status: NEW → RESOLVED
Last Resolved: 4 months ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52

Comment 8

2 months ago
I have reproduced this bug with Firefox nightly 52.0a1(build id:20161109030210)on
windows 7(64 bit)

I have verified this bug as fixed with Firefox beta 52.0b3(build id:20170202101509)
User agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0

[testday-20170203]
(Reporter)

Updated

2 months ago
Status: RESOLVED → VERIFIED
status-firefox52: fixed → verified
You need to log in before you can comment on or make changes to this bug.