Chromium Code Reviews| Index: sdk/lib/_internal/js_runtime/lib/js_helper.dart |
| diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart |
| index 07d1cbb60b64be5572297a6b6252656ed7ee68e3..3be1e9d4954b206bc79732c92d9c029a846b3cdf 100644 |
| --- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart |
| +++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart |
| @@ -679,11 +679,14 @@ class ReflectionInfo { |
| if (JS('bool', 'typeof # == "number"', functionType)) { |
| return getType(functionType); |
| } else if (JS('bool', 'typeof # == "function"', functionType)) { |
| - var fakeInstance = JS('', 'new #()', jsConstructor); |
| - setRuntimeTypeInfo( |
| - fakeInstance, JS('JSExtendableArray', '#["<>"]', fakeInstance)); |
| - return JS('=Object|Null', r'#.apply({$receiver:#})', |
| - functionType, fakeInstance); |
| + if (jsConstructor != null) { |
|
Siggi Cherem (dart-lang)
2017/01/03 18:58:13
can you give me some extra details of when this ha
Johnni Winther
2017/01/04 09:15:39
It was provoked by lrn's landing of https://codere
|
| + var fakeInstance = JS('', 'new #()', jsConstructor); |
| + setRuntimeTypeInfo( |
| + fakeInstance, JS('JSExtendableArray', '#["<>"]', fakeInstance)); |
| + return JS('=Object|Null', r'#.apply({$receiver:#})', |
| + functionType, fakeInstance); |
| + } |
| + return functionType; |
| } else { |
| throw new RuntimeError('Unexpected function type'); |
| } |