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

Unified Diff: runtime/vm/kernel_reader.cc

Issue 2583153002: Set correct script on fields in kernel. (Closed)
Patch Set: Created 4 years 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/vm/kernel_reader.cc
diff --git a/runtime/vm/kernel_reader.cc b/runtime/vm/kernel_reader.cc
index d11e931e529e27a84b6c13ab68a19e5910b13921..695d7bf2536e864a34028f449182461a378a9f95 100644
--- a/runtime/vm/kernel_reader.cc
+++ b/runtime/vm/kernel_reader.cc
@@ -293,6 +293,8 @@ dart::Class& KernelReader::ReadClass(const dart::Library& library,
const dart::String& name = H.DartFieldName(kernel_field->name());
const AbstractType& type =
T.TranslateTypeWithoutFinalization(kernel_field->type());
+ const Object& script_class =
+ ClassForScriptAt(klass, kernel_field->source_uri_index());
dart::Field& field = dart::Field::Handle(
Z, dart::Field::New(name, kernel_field->IsStatic(),
// In the VM all const fields are implicitly final
@@ -301,7 +303,7 @@ dart::Class& KernelReader::ReadClass(const dart::Library& library,
kernel_field->IsFinal() || kernel_field->IsConst(),
kernel_field->IsConst(),
false, // is_reflectable
- klass, type, kernel_field->position()));
+ script_class, type, kernel_field->position()));
field.set_kernel_field(kernel_field);
field.set_has_initializer(kernel_field->initializer() != NULL);
GenerateFieldAccessors(klass, field, kernel_field);
« 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