Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index d65e3629bb6d676f2f1c10b935ad7abffab0113c..00ab785324addee8954c26aca584da1bd630271d 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -5257,7 +5257,7 @@ bool Function::HasCode() const { |
void Function::ClearCode() const { |
- ASSERT(ic_data_array() == Array::null()); |
+ ASSERT((usage_counter() != 0) || (ic_data_array() == Array::null())); |
StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); |
SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code())); |
} |