Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 873ff206b8bc0cfedd860e4841737d6418a91917..9dc1148c4fcac15882d58fe0c8f2f18b5882d1db 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -843,6 +843,13 @@ void Object::InitOnce(Isolate* isolate) { |
Report::kBailout, |
Heap::kOld); |
+ // Some thread fields need to be reinitialized as null constants have not been |
+ // initialized until now. |
+ Thread* thr = Thread::Current(); |
+ ASSERT(thr != NULL); |
+ thr->clear_sticky_error(); |
+ thr->clear_pending_functions(); |
+ |
ASSERT(!null_object_->IsSmi()); |
ASSERT(!null_array_->IsSmi()); |
ASSERT(null_array_->IsArray()); |