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

Unified Diff: runtime/vm/kernel_reader.cc

Issue 2771443003: [kernel] Fix getter, run service tests in debug mode (Closed)
Patch Set: Re-insert assert, don't create getter for static field without initializer 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
« no previous file with comments | « runtime/observatory/tests/service/service_kernel.status ('k') | no next file » | 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 558ecd11670edf95f35f76565838aaf9c3b12bd0..04526bfa3ec5731d301109055388f0c07341a409 100644
--- a/runtime/vm/kernel_reader.cc
+++ b/runtime/vm/kernel_reader.cc
@@ -562,6 +562,10 @@ Script& KernelReader::ScriptAt(intptr_t source_uri_index, String* import_uri) {
void KernelReader::GenerateFieldAccessors(const dart::Class& klass,
const dart::Field& field,
Field* kernel_field) {
+ if (kernel_field->IsStatic() && kernel_field->initializer() == NULL) {
+ field.SetStaticValue(Instance::Handle(Z), true);
Kevin Millikin (Google) 2017/03/22 14:11:26 Comment: // Static fields without an initializer
+ return;
+ }
if (kernel_field->initializer() != NULL) {
SimpleExpressionConverter converter(H.thread());
const bool has_simple_initializer =
« no previous file with comments | « runtime/observatory/tests/service/service_kernel.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698