Closed Bug 952197 Opened 11 years ago Closed 7 years ago

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

Categories

(DevTools Graveyard :: Scratchpad, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: msucan, Unassigned)

References

Details

(Whiteboard: [lang=js])

Scratchpad should use VariablesView.getString() for pretty output of objects. We should also remove the ObjectActor.onDisplayString() request type.
Priority: -- → P3
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.
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!
Mentor: mihai.sucan
Whiteboard: [mentor=msucan][lang=js] → [lang=js]
Mentor: mihai.sucan
Mass-closing scratchpad bugs not touched in the past 2 years.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.