Chromium Code Reviews| Index: sdk/lib/_internal/compiler/js_lib/js_helper.dart |
| diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
| index dd7f4dc27e6cc0e9857ca4a82f522cec1e7c75ab..af144917367cddae518a4f6fdd3db9f15a6b41e7 100644 |
| --- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
| +++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart |
| @@ -1963,7 +1963,7 @@ abstract class Closure implements Function { |
| */ |
| static fromTearOff(receiver, |
| List functions, |
| - List reflectionInfo, |
| + var reflectionInfo, |
|
floitsch
2015/02/03 19:40:02
Add comments to the function with the information
herhut
2015/02/03 21:18:58
Done.
|
| bool isStatic, |
| jsArguments, |
| String propertyName) { |
| @@ -1977,10 +1977,15 @@ abstract class Closure implements Function { |
| String name = JS('String|Null', '#.\$stubName', function); |
| String callName = JS('String|Null', '#.\$callName', function); |
| - JS('', '#.\$reflectionInfo = #', function, reflectionInfo); |
| - ReflectionInfo info = new ReflectionInfo(function); |
| + var functionType; |
| + if (reflectionInfo is List) { |
| + JS('', '#.\$reflectionInfo = #', function, reflectionInfo); |
| + ReflectionInfo info = new ReflectionInfo(function); |
| + functionType = info.functionType; |
| + } else { |
| + functionType = reflectionInfo; |
| + } |
| - var functionType = info.functionType; |
| // function tmp() {}; |
| // tmp.prototype = BC.prototype; |
| @@ -2322,7 +2327,8 @@ closureFromTearOff(receiver, |
| return Closure.fromTearOff( |
| receiver, |
| JSArray.markFixedList(functions), |
| - JSArray.markFixedList(reflectionInfo), |
| + reflectionInfo is List ? JSArray.markFixedList(reflectionInfo) |
| + : reflectionInfo, |
| JS('bool', '!!#', isStatic), |
| jsArguments, |
| JS('String', '#', name)); |