Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1076)

Unified Diff: lib/runtime/dart_runtime.js

Issue 1143953004: Fixes for sunflower (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698