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

Unified Diff: runtime/vm/isolate.h

Issue 1417523006: 1. Do not initialize the stack limit during isolate initialization, it is done instead at StartIsol… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-review-comments Created 5 years, 1 month 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/dart.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 52b078fb29de6adec9f1f2ace1b84d46b362a090..0fbb07c0d921c05a6dd613e0688b9a2edcd990b3 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -212,7 +212,6 @@ class Isolate : public BaseIsolate {
library_tag_handler_ = value;
}
- void InitializeStackLimit();
void SetStackLimit(uword value);
void SetStackLimitFromStackBase(uword stack_base);
void ClearStackLimit();
@@ -912,26 +911,29 @@ class StartIsolateScope {
: new_isolate_(new_isolate), saved_isolate_(Isolate::Current()) {
// TODO(koda): Audit users; passing NULL goes against naming of this class.
if (new_isolate_ == NULL) {
+ ASSERT(Isolate::Current() == NULL);
// Do nothing.
return;
}
if (saved_isolate_ != new_isolate_) {
ASSERT(Isolate::Current() == NULL);
+ // Ensure this is not a nested 'isolate enter' with prior state.
+ ASSERT(new_isolate_->stack_base() == 0);
Thread::EnterIsolate(new_isolate_);
- new_isolate_->SetStackLimitFromStackBase(
- Isolate::GetCurrentStackPointer());
}
}
~StartIsolateScope() {
if (new_isolate_ == NULL) {
+ ASSERT(Isolate::Current() == NULL);
// Do nothing.
return;
}
if (saved_isolate_ != new_isolate_) {
- new_isolate_->ClearStackLimit();
- Thread::ExitIsolate();
ASSERT(saved_isolate_ == NULL);
+ // ASSERT that we have bottomed out of all Dart invocations.
+ ASSERT(new_isolate_->stack_base() == 0);
+ Thread::ExitIsolate();
}
}
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698