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

Unified Diff: runtime/vm/safepoint.cc

Issue 2995543004: [vm, gc] Require a safepoint for heap iteration. (Closed)
Patch Set: explicit-thread Created 3 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/safepoint.h ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/safepoint.cc
diff --git a/runtime/vm/safepoint.cc b/runtime/vm/safepoint.cc
index 7dabc5a738f7df5d0f0435b2b71be9c75603f1f9..09c564664883843b51b0172d074d4c8d8311cce5 100644
--- a/runtime/vm/safepoint.cc
+++ b/runtime/vm/safepoint.cc
@@ -13,7 +13,6 @@ SafepointOperationScope::SafepointOperationScope(Thread* T) : StackResource(T) {
ASSERT(T != NULL);
Isolate* I = T->isolate();
ASSERT(I != NULL);
- ASSERT(T->no_safepoint_scope_depth() == 0);
SafepointHandler* handler = I->safepoint_handler();
ASSERT(handler != NULL);
@@ -51,6 +50,9 @@ SafepointHandler::~SafepointHandler() {
}
void SafepointHandler::SafepointThreads(Thread* T) {
+ ASSERT(T->no_safepoint_scope_depth() == 0);
+ ASSERT(T->execution_state() == Thread::kThreadInVM);
+
{
// First grab the threads list lock for this isolate
// and check if a safepoint is already in progress. This
« no previous file with comments | « runtime/vm/safepoint.h ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698