Revision: 2736
Author: [email protected]
Date: Fri Aug 21 01:44:21 2009
Log: Fix a GC issue.

When descriptor arrays where allocated with the initial map the handling of  
allocation failures was not correct. This could cause the map returned  
could possible have been collected.
Review URL: http://codereview.chromium.org/173188
http://code.google.com/p/v8/source/detail?r=2736

Modified:
  /branches/bleeding_edge/src/heap.cc

=======================================
--- /branches/bleeding_edge/src/heap.cc Thu Aug 20 01:08:18 2009
+++ /branches/bleeding_edge/src/heap.cc Fri Aug 21 01:44:21 2009
@@ -2089,8 +2089,9 @@
      if (count > in_object_properties) {
        count = in_object_properties;
      }
-    DescriptorArray* descriptors = *Factory::NewDescriptorArray(count);
-    if (descriptors->IsFailure()) return descriptors;
+    Object* descriptors_obj = DescriptorArray::Allocate(count);
+    if (descriptors_obj->IsFailure()) return descriptors_obj;
+    DescriptorArray* descriptors = DescriptorArray::cast(descriptors_obj);
      for (int i = 0; i < count; i++) {
        String* name = fun->shared()->GetThisPropertyAssignmentName(i);
        ASSERT(name->IsSymbol());

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to