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

Unified Diff: runtime/vm/base_isolate.h

Issue 1185013005: Assert helper threads do not (yet) attempt to access the "current zone". (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/base_isolate.h
diff --git a/runtime/vm/base_isolate.h b/runtime/vm/base_isolate.h
index 067c70882a30580ffc2221fe36eae773ed3588a7..dccb44b4c38d51f90912d39f7df568be2afc0a93 100644
--- a/runtime/vm/base_isolate.h
+++ b/runtime/vm/base_isolate.h
@@ -26,8 +26,16 @@ class BaseIsolate {
}
// DEPRECATED: Use Thread::current_zone.
- Zone* current_zone() const { return current_zone_; }
+ Zone* current_zone() const {
+ AssertCurrentThreadIsMutator();
+ return current_zone_;
+ }
void set_current_zone(Zone* zone) { current_zone_ = zone; }
+#if defined(DEBUG)
+ void AssertCurrentThreadIsMutator() const;
+#else
+ void AssertCurrentThreadIsMutator() const {}
+#endif // DEBUG
HandleScope* top_handle_scope() const {
#if defined(DEBUG)
« no previous file with comments | « no previous file | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698