Closed Bug 1558504 Opened 5 years ago Closed 5 years ago

Previewing a Set containing an Object seems to be broken

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox-esr60 unaffected, firefox67 unaffected, firefox68 unaffected, firefox69+ fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox-esr60 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 + fixed

People

(Reporter: bzbarsky, Assigned: bhackett1024)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [debugger-mvp])

Attachments

(1 file)

STEPS TO REPRODUCE (found by Nicolas Chevobbe)

  1. Open console.
  2. Type new Set([{a: 1}])
  3. Hit enter.

EXPECTED RESULTS: Set [ {…} ] which can be expanded to view the object in it, etc.

ACTUAL RESULTS: Set [ Restricted ] and the expansion does not show the object.

Regression range: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=155a7e2117e575ff6de6caa3dfe5b076cb455ae1&tochange=3f656afb0c08aae2ed9b2ebe4128bac71146c679

My money is on bug 1325195, which rejiggered how enumSetEntries works. The old code used to do:

    const raw = objectActor.obj.unsafeDereference();
    values = [...Cu.waiveXrays(Set.prototype.values.call(raw))];

and the new code does:

  const raw = objectActor.obj.unsafeDereference();
  const iterator =
    objectActor.obj.makeDebuggeeValue(waiveXrays(Set.prototype.values.call(raw)));
  const values = [...DevToolsUtils.makeDebuggeeIterator(iterator)];

which seems quite different, and in particular is not waiving Xrays on the values in the array, afaict, while the old code did.

OK, I confirmed that locally backing out https://hg.mozilla.org/integration/mozilla-inbound/rev/86f6fc53e2fd fixes this for me.

Flags: needinfo?(bhackett1024)
Flags: needinfo?(bhackett1024)
Assignee: nobody → bhackett1024
Status: NEW → ASSIGNED
Priority: -- → P1
Blocks: dbg-api
Whiteboard: [debugger-mvp]
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/23f91fec9232 Waive xrays on contents of Set and Map objects when previewing, r=loganfsmyth.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: