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 936893018d7978a746d71403d63f8abc989619a3..f46975eb8f9b96f2f413d4e776d7c46458a7c091 100644 |
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart |
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart |
@@ -2607,18 +2607,21 @@ abstract class Closure implements Function { |
})(#, #)''', |
RAW_DART_FUNCTION_REF(getType), |
functionType); |
- } else if (!isStatic |
- && JS('bool', 'typeof # == "function"', functionType)) { |
- var getReceiver = isIntercepted |
- ? RAW_DART_FUNCTION_REF(BoundClosure.receiverOf) |
- : RAW_DART_FUNCTION_REF(BoundClosure.selfOf); |
- signatureFunction = JS( |
- '', |
- 'function(f,r){' |
- 'return function(){' |
- 'return f.apply({\$receiver:r(this)},arguments)' |
- '}' |
- '}(#,#)', functionType, getReceiver); |
+ } else if (JS('bool', 'typeof # == "function"', functionType)) { |
+ if (isStatic) { |
+ signatureFunction = functionType; |
+ } else { |
+ var getReceiver = isIntercepted |
+ ? RAW_DART_FUNCTION_REF(BoundClosure.receiverOf) |
+ : RAW_DART_FUNCTION_REF(BoundClosure.selfOf); |
+ signatureFunction = JS( |
+ '', |
+ 'function(f,r){' |
+ 'return function(){' |
+ 'return f.apply({\$receiver:r(this)},arguments)' |
+ '}' |
+ '}(#,#)', functionType, getReceiver); |
+ } |
} else { |
throw 'Error in reflectionInfo.'; |
} |