New issue
Advanced search Search tips

Issue 604205 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

String representation of es6 class is wrong

Reported by uri.vale...@gmail.com, Apr 17 2016

Issue description

Chrome 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 !?
 
Labels: Te-NeedsFurtherTriage
Components: Blink>JavaScript
Cc: jgruber@chromium.org
Owner: yangguo@chromium.org
Status: Assigned (was: Unconfirmed)
Yang, any clue?
Cc: yangguo@chromium.org
Components: -Blink>JavaScript Blink>JavaScript>Language
Owner: adamk@chromium.org
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.

Comment 5 by adamk@chromium.org, Jul 13 2016

Labels: -Te-NeedsFurtherTriage Needs-Feedback
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?
It seems to be resolved according to the bug so you can close.
Status: WontFix (was: Assigned)

Sign in to add a comment