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

Unified Diff: runtime/vm/zone.h

Issue 269023005: - Ensure that BaseIsolate is only used to break the header include cycles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
« runtime/vm/allocation.h ('K') | « runtime/vm/timer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone.h
===================================================================
--- runtime/vm/zone.h (revision 35767)
+++ runtime/vm/zone.h (working copy)
@@ -157,7 +157,7 @@
class StackZone : public StackResource {
public:
// Create an empty zone and set is at the current zone for the Isolate.
- explicit StackZone(BaseIsolate* isolate)
+ explicit StackZone(Isolate* isolate)
: StackResource(isolate),
zone_() {
#ifdef DEBUG
@@ -167,14 +167,16 @@
reinterpret_cast<intptr_t>(&zone_));
}
#endif
- zone_.Link(isolate->current_zone());
- isolate->set_current_zone(&zone_);
+ BaseIsolate* base_isolate = reinterpret_cast<BaseIsolate*>(isolate);
+ zone_.Link(base_isolate->current_zone());
+ base_isolate->set_current_zone(&zone_);
}
// Delete all memory associated with the zone.
~StackZone() {
- ASSERT(isolate()->current_zone() == &zone_);
- isolate()->set_current_zone(zone_.previous_);
+ BaseIsolate* base_isolate = reinterpret_cast<BaseIsolate*>(isolate());
+ ASSERT(base_isolate->current_zone() == &zone_);
+ base_isolate->set_current_zone(zone_.previous_);
#ifdef DEBUG
if (FLAG_trace_zones) {
OS::PrintErr("*** Deleting Stack zone 0x%" Px "(0x%" Px ")\n",
« runtime/vm/allocation.h ('K') | « runtime/vm/timer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698