Commit 23eebeed authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix assertion failure. Use Vector instead of List in code deserializer.

R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/390353002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5874bd08
......@@ -811,6 +811,7 @@ Deserializer::~Deserializer() {
delete external_reference_decoder_;
external_reference_decoder_ = NULL;
}
if (attached_objects_) attached_objects_->Dispose();
}
......@@ -2003,8 +2004,8 @@ Handle<SharedFunctionInfo> CodeSerializer::Deserialize(Isolate* isolate,
DisallowHeapAllocation no_gc;
// Prepare and register list of attached objects.
List<Object*> attached_objects(1);
attached_objects.Set(kSourceObjectIndex, *source);
Vector<Object*> attached_objects = Vector<Object*>::New(1);
attached_objects[kSourceObjectIndex] = *source;
deserializer.SetAttachedObjects(&attached_objects);
Object* root;
......
......@@ -254,7 +254,7 @@ class Deserializer: public SerializerDeserializer {
// Serialized user code reference certain objects that are provided in a list
// By calling this method, we assume that we are deserializing user code.
void SetAttachedObjects(List<Object*>* attached_objects) {
void SetAttachedObjects(Vector<Object*>* attached_objects) {
attached_objects_ = attached_objects;
}
......@@ -303,7 +303,7 @@ class Deserializer: public SerializerDeserializer {
Isolate* isolate_;
// Objects from the attached object descriptions in the serialized user code.
List<Object*>* attached_objects_;
Vector<Object*>* attached_objects_;
SnapshotByteSource* source_;
// This is the address of the next object that will be allocated in each
......
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