Push bleeding_edge revision 3387, 3390 to trunk in order to fix test.

Push bleeding_edge revision 3406 to trunk to add stack allocated
information about the state of the heap in OOM situations.  This will
be helpful in getting information from OOM crashes.

Review URL: http://codereview.chromium.org/465026

git-svn-id: http://v8.googlecode.com/svn/trunk@3408 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index 06dc59c..5acfb02 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3356,6 +3356,24 @@
 }
 
 
+void Heap::RecordStats(HeapStats* stats) {
+  stats->new_space_size = new_space_.Size();
+  stats->new_space_capacity = new_space_.Capacity();
+  stats->old_pointer_space_size = old_pointer_space_->Size();
+  stats->old_pointer_space_capacity = old_pointer_space_->Capacity();
+  stats->old_data_space_size = old_data_space_->Size();
+  stats->old_data_space_capacity = old_data_space_->Capacity();
+  stats->code_space_size = code_space_->Size();
+  stats->code_space_capacity = code_space_->Capacity();
+  stats->map_space_size = map_space_->Size();
+  stats->map_space_capacity = map_space_->Capacity();
+  stats->cell_space_size = cell_space_->Size();
+  stats->cell_space_capacity = cell_space_->Capacity();
+  stats->lo_space_size = lo_space_->Size();
+  GlobalHandles::RecordStats(stats);
+}
+
+
 int Heap::PromotedSpaceSize() {
   return old_pointer_space_->Size()
       + old_data_space_->Size()