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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 2785623004: Fix #14144 confusing error message misusing a callable object (Closed)
Patch Set: Created 3 years, 9 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: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 1d3937704a34d910e05de19ccb421b8a24a49274..50eac24972af3a40a8bc6f7b7ec949da0a563972 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -1261,6 +1261,12 @@ class CallSiteInliner : public ValueObject {
TRACE_INLINING(THR_Print(" Bailout: non-closure operator\n"));
continue;
}
+
+ if (target.NumParameters() != call->ArgumentCount()) {
Florian Schneider 2017/03/30 20:18:05 Good catch! Your fix is safe, but it could be imp
+ TRACE_INLINING(THR_Print(" Bailout: wrong parameter count\n"));
+ continue;
+ }
+
GrowableArray<Value*> arguments(call->ArgumentCount());
for (int i = 0; i < call->ArgumentCount(); ++i) {
arguments.Add(call->PushArgumentAt(i)->value());

Powered by Google App Engine
This is Rietveld 408576698