Add an assert to the serializer.

Review URL: https://chromiumcodereview.appspot.com/9159010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
erik.corry@gmail.com 2012-01-19 13:51:45 +00:00
parent b571bd2ce9
commit 60f1618970

View File

@ -1364,6 +1364,13 @@ void PartialSerializer::SerializeObject(
CHECK(o->IsHeapObject());
HeapObject* heap_object = HeapObject::cast(o);
if (heap_object->IsMap()) {
// The code-caches link to context-specific code objects, which
// the startup and context serializes cannot currently handle.
ASSERT(Map::cast(heap_object)->code_cache() ==
heap_object->GetHeap()->raw_unchecked_empty_fixed_array());
}
int root_index;
if ((root_index = RootIndex(heap_object)) != kInvalidRootIndex) {
PutRoot(root_index, heap_object, how_to_code, where_to_point);