Revision: 22407
Author:   [email protected]
Date:     Tue Jul 15 11:01:03 2014 UTC
Log: Fix assertion failure. Use Vector instead of List in code deserializer.

[email protected]

Review URL: https://codereview.chromium.org/390353002
http://code.google.com/p/v8/source/detail?r=22407

Modified:
 /branches/bleeding_edge/src/serialize.cc
 /branches/bleeding_edge/src/serialize.h

=======================================
--- /branches/bleeding_edge/src/serialize.cc    Tue Jul 15 10:17:22 2014 UTC
+++ /branches/bleeding_edge/src/serialize.cc    Tue Jul 15 11:01:03 2014 UTC
@@ -811,6 +811,7 @@
     delete external_reference_decoder_;
     external_reference_decoder_ = NULL;
   }
+  if (attached_objects_) attached_objects_->Dispose();
 }


@@ -2003,8 +2004,8 @@
   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;
=======================================
--- /branches/bleeding_edge/src/serialize.h     Tue Jul 15 10:17:22 2014 UTC
+++ /branches/bleeding_edge/src/serialize.h     Tue Jul 15 11:01:03 2014 UTC
@@ -254,7 +254,7 @@

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

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to