Commit 60f16189 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

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
parent b571bd2c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment