| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 44261365800636ce2ef3dd96f134bdb548af0821..e76e80e572f13e1f7440986e43c582245b6415c5 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -7596,11 +7596,13 @@ void Field::SetPrecompiledInitializer(const Function& initializer) const {
|
|
|
|
|
| bool Field::HasPrecompiledInitializer() const {
|
| - return raw_ptr()->initializer_.precompiled_->IsFunction();
|
| + return raw_ptr()->initializer_.precompiled_->IsHeapObject() &&
|
| + raw_ptr()->initializer_.precompiled_->IsFunction();
|
| }
|
|
|
|
|
| void Field::SetSavedInitialStaticValue(const Instance& value) const {
|
| + ASSERT(!HasPrecompiledInitializer());
|
| StorePointer(&raw_ptr()->initializer_.saved_value_, value.raw());
|
| }
|
|
|
| @@ -7617,7 +7619,7 @@ void Field::EvaluateInitializer() const {
|
| }
|
| ASSERT(value.IsNull() || value.IsInstance());
|
| SetStaticValue(value.IsNull() ? Instance::null_instance()
|
| - : Instance::Cast(value));
|
| + : Instance::Cast(value));
|
| return;
|
| } else if (StaticValue() == Object::transition_sentinel().raw()) {
|
| SetStaticValue(Object::null_instance());
|
|
|