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

Unified Diff: src/heap-inl.h

Issue 8352045: Fix missing write barrier in deserialization. Issue 1783. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « src/heap.h ('k') | src/serialize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
===================================================================
--- src/heap-inl.h (revision 9721)
+++ src/heap-inl.h (working copy)
@@ -276,6 +276,19 @@
}
+bool Heap::InMovingPage(Object* object) {
Vyacheslav Egorov (Chromium) 2011/10/21 11:34:35 I think we really don't need to invoke any increme
+ if (object->IsSmi()) return false;
+ HeapObject* heap_object = HeapObject::cast(object);
+ if (InNewSpace(heap_object)) return true;
+ Address address = heap_object->address();
+ if (lo_space()->Contains(heap_object)) return false;
+ if (old_pointer_space()->FirstPage()->Contains(address)) return false;
+ if (old_data_space()->FirstPage()->Contains(address)) return false;
+ if (map_space()->FirstPage()->Contains(address)) return false;
+ return true;
+}
+
+
bool Heap::InNewSpace(Address addr) {
return new_space_.Contains(addr);
}
« no previous file with comments | « src/heap.h ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698