Chromium Code Reviews| Index: dart/sdk/lib/_internal/lib/isolate_helper.dart |
| diff --git a/dart/sdk/lib/_internal/lib/isolate_helper.dart b/dart/sdk/lib/_internal/lib/isolate_helper.dart |
| index d13871bc6eba2ea3b3cd4160368d5b9b482b53e0..7aa581a333e04bbb94c0ced6b58a9f43f0df32b8 100644 |
| --- a/dart/sdk/lib/_internal/lib/isolate_helper.dart |
| +++ b/dart/sdk/lib/_internal/lib/isolate_helper.dart |
| @@ -8,6 +8,7 @@ import 'dart:async'; |
| import 'dart:collection' show Queue, HashMap; |
| import 'dart:isolate'; |
| import 'dart:_js_helper' show |
| + Closure, |
| Null, |
| Primitives, |
| convertDartClosureToJS; |
| @@ -548,7 +549,7 @@ class IsolateNatives { |
| } |
| static _getJSFunctionFromName(String functionName) { |
| - return JS("", "init.globalFunctions[#]", functionName); |
| + return JS("", "init.globalFunctions[#]()", functionName); |
| } |
| /** |
| @@ -557,7 +558,8 @@ class IsolateNatives { |
| * but you should probably not count on this. |
| */ |
| static String _getJSFunctionName(Function f) { |
| - return JS("String|Null", r"(#['$name'] || #)", f, null); |
| + if (f is! Closure) return null; |
|
kasperl
2013/11/29 10:10:55
?:
ahe
2013/12/06 15:57:53
Done.
|
| + return JS("String|Null", r'#.$name', f); |
| } |
| /** Create a new JavaScript object instance given its constructor. */ |