Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: runtime/vm/object.cc

Issue 1299653003: Migrate LongJumpScope to Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Assert current isolate. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/longjump_test.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « runtime/vm/longjump_test.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698