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

Unified Diff: runtime/vm/raw_object.cc

Issue 51253003: Fix RawObject::IsVMHeapObject to use Contains instead of relying on the mark bit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/raw_object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.cc
===================================================================
--- runtime/vm/raw_object.cc (revision 29464)
+++ runtime/vm/raw_object.cc (working copy)
@@ -5,6 +5,7 @@
#include "vm/raw_object.h"
#include "vm/class_table.h"
+#include "vm/dart.h"
#include "vm/freelist.h"
#include "vm/isolate.h"
#include "vm/object.h"
@@ -14,12 +15,7 @@
namespace dart {
bool RawObject::IsVMHeapObject() const {
- // TODO(asiva): Need a better way to represent VM heap objects, for
- // now we use the premarked property for identifying objects in the
- // VM heap.
- ASSERT(IsHeapObject());
- ASSERT(!Isolate::Current()->heap()->gc_in_progress());
- return IsMarked();
+ return Dart::vm_isolate()->heap()->Contains(ToAddr(this));
}
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698