Closed Bug 964706 Opened 10 years ago Closed 10 years ago

[prettify] Pretty printer can't handle getter and setter syntax

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Firefox 30

People

(Reporter: vporof, Assigned: fitzgen)

Details

Attachments

(1 file)

var foo = {
  get bar() {
  }
  set bar(value) {
  }
};

Pretty print this in scratchpad:

var foo = {
  getbar() {
  }
  setbar(value) {
  }
};

:(
I think it might be a good idea to disable automatically pretty printing "things that look minified" until these errors are sorted out.
(In reply to Victor Porof [:vp] from comment #1)
> I think it might be a good idea to disable automatically pretty printing
> "things that look minified" until these errors are sorted out.

+1 on that.

There are more than 4 different known issues right now ..
(In reply to Victor Porof [:vp] from comment #1)
> I think it might be a good idea to disable automatically pretty printing
> "things that look minified" until these errors are sorted out.

All of them except this one are ES6 only, which isn't an issue since ES6 isn't finalized or used in the web at large, so they only affect chrome code.
Summary: Pretty printer can't handle getters and setters → [prettify] Pretty printer can't handle getter and setter syntax
And the string escaping, I guess.
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Comment on attachment 8376621 [details] [diff] [review]
getter-setter.patch

Review of attachment 8376621 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8376621 - Flags: review?(bbenvie) → review+
https://hg.mozilla.org/mozilla-central/rev/a2692ca4f8da
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 30
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: