The spec here is hazy, but what we give is clearly wrong. Even "[Native Code]" would be a better body than what we give. V8 reasonably gives the source of the whole class definition. We do not. We, like JSC, give the constructor() object's source. Further, the toString behavior of default constructors is bogus. It does not contain the "use strict" directive.
Created attachment 8712967 [details] [diff] [review] At least make default constructors include "use strict"
Assignee: nobody → efaustbmo
Status: NEW → ASSIGNED
Attachment #8712967 - Flags: review?(jwalden+bmo)
That patch isn't sufficient to call this over, but it should land immediately, with leave-open, until we can figure out the rest of this.
Attachment #8712967 - Flags: review?(jwalden+bmo) → review+
"use strict" is nice, but primarily the output of `Function#toString` on a `class` should include the word "class". The direction that the proposal is likely to go tomorrow will require this more explicitly anyways.
This bug should be merged with bug 1216630.
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1216630
You need to log in before you can comment on or make changes to this bug.