String representation of es6 class is wrong
Reported by
uri.vale...@gmail.com,
Apr 17 2016
|
||||||
Issue descriptionChrome Version : 50/51 Basically copy paste from this: https://github.com/angular/angular.js/issues/14240 There seems to be a bug where the string representation of class MyClass {} can be either class MyClass {} (which is correct) or function class MyClass {} (which is incorrect and break the $injector). "Normally" the latter (incorrect) version is used by Chrome, but if you set a breakpoint and step into (or over) the $injector.invoke(...) call, then the former (correct) version is used and everything works as expected !?
,
Jul 1 2016
,
Jul 5 2016
Yang, any clue?
,
Jul 6 2016
JSFunction::ToString checks whether the class_start_position_symbol property of the function object is a smi, in which case we assume that it's a class. Otherwise we prefix the source string with "function ".
However, I have no example where we would run into the case of returning "function class MyClass {}" yet, as the angular bug suggests.
Assigning to the language team.
,
Jul 13 2016
I can't reproduce the reported stack trace using the codepen from the linked github issue (http://codepen.io/smalluban/pen/eZBeNr?editors=1012). I'm using Chrome 51.0.2704.106. uri.valevski, if you're able to reproduce, what version of Chrome are you running?
,
Jul 13 2016
It seems to be resolved according to the bug so you can close.
,
Jul 13 2016
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by msrchandra@chromium.org
, Apr 18 2016