Closed Bug 1709800 Opened 4 years ago Closed 4 years ago

Scripts with private fields can't be pretty printed

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1710417

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Steps to reproduce

  1. Navigate to https://firefox-devtools-private-fields.glitch.me/
  2. Open the debugger
  3. Open the script.js file
  4. Click on the Pretty print source button at the bottom

Expected results

The file gets pretty printed in a new editor tab

Actual results

A new editor tab is opened which contains the following text:

Error loading this URI: Unexpected character '#' (4:9)

The error seems to originate from the acorn library: https://searchfox.org/mozilla-central/source/devtools/shared/acorn/acorn.js#2785

The issue is in acorn, but not in the vendored in version, rather in pretty-fast.
pretty-fast will be updated and a new version will be published to npm (see https://github.com/mozilla/pretty-fast/pull/47)

Severity: -- → S3
Priority: -- → P1
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

pretty printing file with private fields was fixed in Bug 1710417

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.