Last Comment Bug 1316266 - Display ArrayBuffer objects like old console
: Display ArrayBuffer objects like old console
Status: VERIFIED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Shared Components (show other bugs)
: unspecified
: Unspecified Unspecified
P3 normal (vote)
: Firefox 52
Assigned To: Nicolas Chevobbe [:nchevobbe]
:
: Jan Honza Odvarko [:Honza]
Mentors:
Depends on:
Blocks: enable-new-console
  Show dependency treegraph
 
Reported: 2016-11-09 01:02 PST by Tim Nguyen :ntim
Modified: 2017-02-03 00:04 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
verified

MozReview Requests
Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:
Show discarded requests

Attachments
Bug 1316266 - Handle grip `safeGetterValues` property in Grip Reps; (58 bytes, text/x-review-board-request)
2016-11-09 10:19 PST, Nicolas Chevobbe [:nchevobbe]
odvarko: review+
Details | Review

Description User image Tim Nguyen :ntim 2016-11-09 01:02:19 PST
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).
Comment 1 User image Nicolas Chevobbe [:nchevobbe] 2016-11-09 10:19:23 PST Comment hidden (mozreview-request)
Comment 2 User image Nicolas Chevobbe [:nchevobbe] 2016-11-09 22:56:55 PST
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 User image Jan Honza Odvarko [:Honza] 2016-11-10 05:57:56 PST
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
Comment 4 User image Pulsebot 2016-11-10 06:04:23 PST
Pushed by chevobbe.nicolas@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1f58f59c9003
Handle grip `safeGetterValues` property in Grip Reps; r=Honza
Comment 5 User image Nicolas Chevobbe [:nchevobbe] 2016-11-10 06:04:58 PST
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 ?
Comment 6 User image Tim Nguyen :ntim 2016-11-10 06:28:04 PST
(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 User image Carsten Book [:Tomcat] 2016-11-11 07:46:28 PST
https://hg.mozilla.org/mozilla-central/rev/1f58f59c9003
Comment 8 User image Kazi Nuzhat Tasnem 2017-02-02 22:06:25 PST
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]

Note You need to log in before you can comment on or make changes to this bug.