Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index d76324660d3ac9400b7bb7762eb411d226da3cc0..9faf98743e6d331cc60075ad09d2b0b306c006fc 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -2982,6 +2982,9 @@ RawError* Class::EnsureIsFinalized(Thread* thread) const { |
if (is_finalized()) { |
return Error::null(); |
} |
+ if (Compiler::IsBackgroundCompilation()) { |
+ Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); |
+ } |
ASSERT(thread->IsMutatorThread()); |
ASSERT(thread != NULL); |
const Error& error = Error::Handle( |