Closed Bug 1316266 Opened 8 years ago Closed 8 years ago

Display ArrayBuffer objects like old console

Categories

(DevTools :: Shared Components, defect, P3)

defect

Tracking

(firefox52 verified)

VERIFIED FIXED
Firefox 52
Tracking Status
firefox52 --- verified

People

(Reporter: ntim, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

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).
Priority: -- → P3
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 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+
Pushed by chevobbe.nicolas@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1f58f59c9003
Handle grip `safeGetterValues` property in Grip Reps; r=Honza
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 ?
(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
https://hg.mozilla.org/mozilla-central/rev/1f58f59c9003
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
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]
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: