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
This commit is contained in:
yangguo@chromium.org 2014-07-15 11:01:03 +00:00
parent 5874bd08c0
commit 23eebeedbe
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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