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

Unified Diff: runtime/vm/dart_entry.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/allocation_test.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.cc
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 211ce7fc001286a5983f4026e9dd803a58c2e765..5f029e9f1d437324a90ba764665fe294c0ac1560 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -55,19 +55,19 @@ class ScopedIsolateStackLimits : public ValueObject {
};
-// Clears/restores Isolate::long_jump_base on construction/destruction.
+// Clears/restores Thread::long_jump_base on construction/destruction.
// Ensures that we do not attempt to long jump across Dart frames.
class SuspendLongJumpScope : public StackResource {
public:
- explicit SuspendLongJumpScope(Isolate* isolate)
- : StackResource(isolate),
- saved_long_jump_base_(isolate->long_jump_base()) {
- isolate->set_long_jump_base(NULL);
+ explicit SuspendLongJumpScope(Thread* thread)
+ : StackResource(thread),
+ saved_long_jump_base_(thread->long_jump_base()) {
+ thread->set_long_jump_base(NULL);
}
~SuspendLongJumpScope() {
- ASSERT(isolate()->long_jump_base() == NULL);
- isolate()->set_long_jump_base(saved_long_jump_base_);
+ ASSERT(thread()->long_jump_base() == NULL);
+ thread()->set_long_jump_base(saved_long_jump_base_);
}
private:
@@ -98,7 +98,7 @@ RawObject* DartEntry::InvokeFunction(const Function& function,
ASSERT(!code.IsNull());
ASSERT(Isolate::Current()->no_callback_scope_depth() == 0);
ScopedIsolateStackLimits stack_limit(isolate);
- SuspendLongJumpScope suspend_long_jump_scope(isolate);
+ SuspendLongJumpScope suspend_long_jump_scope(thread);
#if defined(USING_SIMULATOR)
#if defined(ARCH_IS_64_BIT)
// TODO(zra): Change to intptr_t so we have only one case.
« no previous file with comments | « runtime/vm/allocation_test.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698