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

Unified Diff: lib/runtime/dart/_operations.js

Issue 1601353002: partial fix for #414, nSM message for dcall should show correct target (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | test/browser/runtime_tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_operations.js
diff --git a/lib/runtime/dart/_operations.js b/lib/runtime/dart/_operations.js
index c2fa2b69afa6189042857520efb2b5b67c892551..3af72e9ae3a7ee17e4a87b1c54fe01ef70b6bc28 100644
--- a/lib/runtime/dart/_operations.js
+++ b/lib/runtime/dart/_operations.js
@@ -103,6 +103,7 @@ dart_library.library('dart/_operations', null, /* Imports */[
}
function checkAndCall(f, ftype, obj, args, name) {
+ let originalFunction = f;
if (!(f instanceof Function)) {
// We're not a function (and hence not a method either)
// Grab the `call` method if it's not a function.
@@ -111,7 +112,7 @@ dart_library.library('dart/_operations', null, /* Imports */[
f = f.call;
}
if (!(f instanceof Function)) {
- throwNoSuchMethod(obj, name, args);
+ throwNoSuchMethod(obj, name, args, originalFunction);
}
}
// If f is a function, but not a method (no method type)
@@ -133,7 +134,7 @@ dart_library.library('dart/_operations', null, /* Imports */[
// TODO(leafp): throw a type error (rather than NSM)
// if the arity matches but the types are wrong.
- throwNoSuchMethod(obj, name, args, f);
+ throwNoSuchMethod(obj, name, args, originalFunction);
}
function dcall(f, ...args) {
« no previous file with comments | « no previous file | test/browser/runtime_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698