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

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: Rediff against https://codereview.chromium.org/1154213008/ 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 8549ca8c94c055ebec2b3fe57ca08c0d57d762b2..67cb4e23f5ed193a4637d85021027ba7086775b3 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);
+ }
+
+ 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