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 1868803002: Use symbols when looking up fields in a class (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 5127dce9addf9b97436566cd29b7ebdffac9ae26..01d97cdc116ffbb0f5fcad9b1fa995844d1e72de 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -717,7 +717,8 @@ static RawInstance* InvokeClassGetter(const Class& klass,
const String& getter_name,
const bool throw_nsm_if_absent) {
// Note static fields do not have implicit getters.
- const Field& field = Field::Handle(klass.LookupStaticField(getter_name));
+ const Field& field =
+ Field::Handle(klass.LookupStaticFieldAllowPrivate(getter_name));
if (field.IsNull() || field.IsUninitialized()) {
const String& internal_getter_name = String::Handle(
Field::GetterName(getter_name));
@@ -1569,7 +1570,8 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeSetter, 4) {
}
// Check for real fields and user-defined setters.
- const Field& field = Field::Handle(klass.LookupStaticField(setter_name));
+ const Field& field =
+ Field::Handle(klass.LookupStaticFieldAllowPrivate(setter_name));
Function& setter = Function::Handle();
const String& internal_setter_name = String::Handle(
Field::SetterName(setter_name));
« no previous file with comments | « runtime/lib/math.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698