Index: src/heap-profiler.cc |
=================================================================== |
--- src/heap-profiler.cc (revision 5888) |
+++ src/heap-profiler.cc (working copy) |
@@ -69,7 +69,8 @@ |
JSObjectsCluster Clusterizer::Clusterize(HeapObject* obj, bool fine_grain) { |
if (obj->IsJSObject()) { |
JSObject* js_obj = JSObject::cast(obj); |
- String* constructor = JSObject::cast(js_obj)->constructor_name(); |
+ String* constructor = GetConstructorNameForHeapProfile( |
+ JSObject::cast(js_obj)); |
// Differentiate Object and Array instances. |
if (fine_grain && (constructor == Heap::Object_symbol() || |
constructor == Heap::Array_symbol())) { |
@@ -714,7 +715,7 @@ |
static void PrintProducerStackTrace(Object* obj, void* trace) { |
if (!obj->IsJSObject()) return; |
- String* constructor = JSObject::cast(obj)->constructor_name(); |
+ String* constructor = GetConstructorNameForHeapProfile(JSObject::cast(obj)); |
SmartPointer<char> s_name( |
constructor->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL)); |
LOG(HeapSampleJSProducerEvent(GetConstructorName(*s_name), |
@@ -886,7 +887,8 @@ |
return JSObjectsCluster(String::cast(object)); |
} else { |
JSObject* js_obj = JSObject::cast(object); |
- String* constructor = JSObject::cast(js_obj)->constructor_name(); |
+ String* constructor = GetConstructorNameForHeapProfile( |
+ JSObject::cast(js_obj)); |
return JSObjectsCluster(constructor, object); |
} |
} |