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

Unified Diff: runtime/lib/mirrors.cc

Issue 1280713002: Replace is_synthetic bit on Fields with is_reflectable. Mark private fields of dart:* as non-reflec… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/object.h » ('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 24c952393ccb79ba4fe72c51ad6ab1e6fd9f204a..d68e758aa24f20963ac6c42fbdff122ce1938060 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -1077,7 +1077,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_members, 3) {
Field& field = Field::Handle();
for (intptr_t i = 0; i < num_fields; i++) {
field ^= fields.At(i);
- if (!field.is_synthetic()) {
+ if (field.is_reflectable()) {
member_mirror = CreateVariableMirror(field, owner_mirror);
member_mirrors.Add(member_mirror);
}
@@ -1172,7 +1172,7 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_members, 2) {
}
} else if (entry.IsField()) {
const Field& field = Field::Cast(entry);
- if (!field.is_synthetic()) {
+ if (field.is_reflectable()) {
member_mirror = CreateVariableMirror(field, owner_mirror);
member_mirrors.Add(member_mirror);
}
@@ -1609,7 +1609,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeSetter, 4) {
return result.raw();
}
- if (field.is_final()) {
+ if (field.is_final() || !field.is_reflectable()) {
ThrowNoSuchMethod(AbstractType::Handle(klass.RareType()),
internal_setter_name,
setter,
@@ -1906,7 +1906,7 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_invokeSetter, 4) {
return result.raw();
}
- if (field.is_final()) {
+ if (field.is_final() || !field.is_reflectable()) {
ThrowNoSuchMethod(Instance::null_instance(),
internal_setter_name,
setter,
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698