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

Unified Diff: runtime/vm/allocation.cc

Issue 1292063004: Add NoSafepointScope to ObjectPointerVisitor. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Move implementation. 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.h ('k') | runtime/vm/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/allocation.cc
diff --git a/runtime/vm/allocation.cc b/runtime/vm/allocation.cc
index 92e288539d8b91aef7d0bb4efba8279d6ff6cb37..b6fda7b8478f61be06d8c2a2687aba0dacac737b 100644
--- a/runtime/vm/allocation.cc
+++ b/runtime/vm/allocation.cc
@@ -38,4 +38,16 @@ void StackResource::UnwindAbove(Thread* thread, StackResource* new_top) {
}
}
+
+#if defined(DEBUG)
+NoSafepointScope::NoSafepointScope() : StackResource(Thread::Current()) {
+ thread()->IncrementNoSafepointScopeDepth();
+}
+
+
+NoSafepointScope::~NoSafepointScope() {
+ thread()->DecrementNoSafepointScopeDepth();
+}
+#endif // defined(DEBUG)
+
} // namespace dart
« no previous file with comments | « runtime/vm/allocation.h ('k') | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698