Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index c58c377767b8130745f229166ac19a6a35065749..f201aa8c362bd8e6579b5bf95fb20da9cde88f38 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -2954,6 +2954,7 @@ RawObject* Class::Evaluate(const String& expr, |
// Ensure that top level parsing of the class has been done. |
+// TODO(24109): Migrate interface to Thread*. |
RawError* Class::EnsureIsFinalized(Isolate* isolate) const { |
// Finalized classes have already been parsed. |
if (is_finalized()) { |
@@ -2961,9 +2962,12 @@ RawError* Class::EnsureIsFinalized(Isolate* isolate) const { |
} |
ASSERT(isolate != NULL); |
const Error& error = Error::Handle(isolate, Compiler::CompileClass(*this)); |
- if (!error.IsNull() && (isolate->long_jump_base() != NULL)) { |
- Report::LongJump(error); |
- UNREACHABLE(); |
+ if (!error.IsNull()) { |
+ ASSERT(isolate == Thread::Current()->isolate()); |
+ if (Thread::Current()->long_jump_base() != NULL) { |
+ Report::LongJump(error); |
+ UNREACHABLE(); |
+ } |
} |
return error.raw(); |
} |