Function ElementsAreSafeToExamine was undefined in release heap verify.
authormvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 29 Oct 2013 07:56:47 +0000 (07:56 +0000)
committermvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 29 Oct 2013 07:56:47 +0000 (07:56 +0000)
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects-debug.cc
src/objects.h

index fa3c375..6ab2ddf 100644 (file)
@@ -306,6 +306,13 @@ void ExternalDoubleArray::ExternalDoubleArrayVerify() {
 }
 
 
+bool JSObject::ElementsAreSafeToExamine() {
+  return (FLAG_use_gvn && FLAG_use_allocation_folding) ||
+      reinterpret_cast<Map*>(elements()) !=
+      GetHeap()->one_pointer_filler_map();
+}
+
+
 void JSObject::JSObjectVerify() {
   VerifyHeapPointer(properties());
   VerifyHeapPointer(elements());
@@ -1139,13 +1146,6 @@ void JSObject::SpillInformation::Print() {
 }
 
 
-bool JSObject::ElementsAreSafeToExamine() {
-  return (FLAG_use_gvn && FLAG_use_allocation_folding) ||
-      reinterpret_cast<Map*>(elements()) !=
-      GetHeap()->one_pointer_filler_map();
-}
-
-
 bool DescriptorArray::IsSortedNoDuplicates(int valid_entries) {
   if (valid_entries == -1) valid_entries = number_of_descriptors();
   Name* current_key = NULL;
index c0835e2..e8c9850 100644 (file)
@@ -2595,12 +2595,15 @@ class JSObject: public JSReceiver {
   };
 
   void IncrementSpillStatistics(SpillInformation* info);
+#endif
 
+#ifdef VERIFY_HEAP
   // If a GC was caused while constructing this object, the elements pointer
   // may point to a one pointer filler map. The object won't be rooted, but
   // our heap verification code could stumble across it.
   bool ElementsAreSafeToExamine();
 #endif
+
   Object* SlowReverseLookup(Object* value);
 
   // Maximal number of fast properties for the JSObject. Used to