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

Unified Diff: runtime/lib/mirrors.cc

Issue 2416513003: Fix issues with argument evaluation order and noSuchMethod errors. (Closed)
Patch Set: Created 4 years, 2 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 | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 1478f0467c0db0298d217ff95b3024cbfd76619d..611c3d39260b1f7b68aff32218c461a0a39c6a6d 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -1607,10 +1607,14 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeSetter, 4) {
}
if (field.is_final() || !field.is_reflectable()) {
+ const int kNumArgs = 1;
+ const Array& args = Array::Handle(Array::New(kNumArgs));
+ args.SetAt(0, value);
+
ThrowNoSuchMethod(AbstractType::Handle(klass.RareType()),
internal_setter_name,
setter,
- Object::null_array(),
+ args,
Object::null_array(),
InvocationMirror::kStatic,
InvocationMirror::kSetter);
@@ -1908,10 +1912,14 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_invokeSetter, 4) {
}
if (field.is_final() || !field.is_reflectable()) {
+ const int kNumArgs = 1;
+ const Array& args = Array::Handle(Array::New(kNumArgs));
+ args.SetAt(0, value);
+
ThrowNoSuchMethod(Instance::null_instance(),
internal_setter_name,
setter,
- Object::null_array(),
+ args,
Object::null_array(),
InvocationMirror::kTopLevel,
InvocationMirror::kSetter);
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698