If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Scratchpad should use VariablesView.getString() for pretty output of objects

NEW
Unassigned

Status

()

Firefox
Developer Tools: Scratchpad
P3
normal
4 years ago
2 years ago

People

(Reporter: msucan, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [lang=js])

(Reporter)

Description

4 years ago
Scratchpad should use VariablesView.getString() for pretty output of objects. We should also remove the ObjectActor.onDisplayString() request type.
Priority: -- → P3
(Reporter)

Updated

4 years ago
Whiteboard: [mentor=msucan][lang=js]
Hi Mihai,

I am interested to work on this bug,could you please guide me on getting started with it?

Thanks.
(Reporter)

Comment 2

4 years ago
Hello Abhishek!

Thanks for your interest to help with this bug as well.

Please note this is not a 'good first bug'. Fixing this bug requires additional experience. If you feel prepared, we are happy to review a patch from you.

A general overview:

- Scratchpad uses a displayString request sent to the object actor to get the text-only representation for objects.
- later we added more properties to the object actor to allow pretty output without the need for additional requests. These are available in the object grip.
- to do text-only pretty output you no longer need to send the displayString request to the object actor, just call VariablesView.getString(objectActorGrip). You have this when you receive the JS eval result.
- see scratchpad.js: writeAsErrorComment() and _writePrimitiveAsComment() and search in the file where these are used.
- you should also cleanup script.js from the devtools actors folder, to remove displayString() and the stringifiers.

Please read the code and if you have questions, let us know. Thanks!
(Assignee)

Updated

3 years ago
Mentor: mihai.sucan@gmail.com
Whiteboard: [mentor=msucan][lang=js] → [lang=js]
Mentor: mihai.sucan@gmail.com
You need to log in before you can comment on or make changes to this bug.