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

Unified Diff: runtime/vm/gc_marker.cc

Issue 9398014: Ignore deleted handles when processing weak roots. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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/dart_api_impl_test.cc ('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/gc_marker.cc
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index 2c8c9f2fb73a2b3ca036b0790808b1109efa94f0..a8985cfcf9b94134eff59a82a5cb1faba3bf4a25 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -197,7 +197,10 @@ class MarkingWeakVisitor : public HandleVisitor {
WeakPersistentHandle* handle =
reinterpret_cast<WeakPersistentHandle*>(addr);
RawObject* raw_obj = handle->raw();
- ASSERT(raw_obj->IsHeapObject());
+ if (!raw_obj->IsHeapObject()) {
+ // Deleted handles are identified by a Smi as the raw object value.
siva 2012/02/15 01:45:07 We could probably do a Clear() in FreeHandle() tha
+ return;
+ }
if (!raw_obj->IsMarked() && raw_obj->IsOldObject()) {
WeakPersistentHandle::Finalize(handle);
}
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698