JSON Viewer shows "<!-- undefined -->" because of Reps

RESOLVED DUPLICATE of bug 1377668

Status

RESOLVED DUPLICATE of bug 1377668
a year ago
4 months ago

People

(Reporter: Oriol, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
1. Load data:application/json,[{"actor":true,"preview":{"nodeType":8}}]
2. Click the 0 property
3. The subtree collapses and shows "<!-- undefined -->" instead of "Object".

This is because Reps accesses the object. Either Reps should not be touching the object at all, or JSON Viewer should not give the object to Reps this way.

https://dxr.mozilla.org/mozilla-central/rev/45fde181a497a187d01d5412f5b72897c7520517/devtools/client/shared/components/reps/reps.js#2266

	function supportsObject(object, type) {
	  if (!isGrip(object)) {
	    return false;
	  }
	  return object.preview && object.preview.nodeType === nodeConstants.COMMENT_NODE;
	}
Thanks for the report!

This will be fixed with bug 1377668

Honza
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1377668

Updated

4 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.