Chromium Code Reviews| Index: lib/runtime/dart_runtime.js |
| diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js |
| index 4d0aa208d41ca4f43b0e48acd2b7837d88f2b6f6..24735fba46bde9b06d48ab090a433e8f436d8168 100644 |
| --- a/lib/runtime/dart_runtime.js |
| +++ b/lib/runtime/dart_runtime.js |
| @@ -96,10 +96,16 @@ var dart, _js_helper, _js_primitives; |
| ftype = _getFunctionType(f); |
| } |
| - // TODO(leafp): Allow JS objects to go through? |
| - if (!ftype) throw "Unable to find a type for applicand"; |
| + if (!ftype) { |
| + // TODO(leafp): Allow JS objects to go through? |
| + // This includes the DOM. |
| + return f.apply(obj, args); |
|
vsm
2015/05/26 13:40:58
We were breaking in a DOM call - no function type
Leaf
2015/05/26 18:19:45
Yes, if we have types for these that could be usef
|
| + } |
| + |
| + if (ftype.checkApply(args)) { |
| + return f.apply(obj, args); |
| + } |
| - if (ftype.checkApply(args)) return f.apply(obj, args); |
| // TODO(leafp): throw a type error (rather than NSM) |
| // if the arity matches but the types are wrong. |
| throwNoSuchMethod(obj, name, args, f); |