| Index: src/profiler/heap-snapshot-generator.cc
|
| diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc
|
| index 2268db223f27a9083f06105154a7e02f3bd5449e..4d18d5cd836ff9d478396c08dacc14a5d4c032ac 100644
|
| --- a/src/profiler/heap-snapshot-generator.cc
|
| +++ b/src/profiler/heap-snapshot-generator.cc
|
| @@ -1739,14 +1739,11 @@ void V8HeapExplorer::ExtractInternalReferences(JSObject* js_obj, int entry) {
|
|
|
|
|
| String* V8HeapExplorer::GetConstructorName(JSObject* object) {
|
| - Heap* heap = object->GetHeap();
|
| - if (object->IsJSFunction()) return heap->closure_string();
|
| - String* constructor_name = object->constructor_name();
|
| - if (constructor_name == heap->Object_string()) {
|
| - // TODO(verwaest): Try to get object.constructor.name in this case.
|
| - // This requires handlification of the V8HeapExplorer.
|
| - }
|
| - return object->constructor_name();
|
| + Isolate* isolate = object->GetIsolate();
|
| + if (object->IsJSFunction()) return isolate->heap()->closure_string();
|
| + DisallowHeapAllocation no_gc;
|
| + HandleScope scope(isolate);
|
| + return *JSReceiver::GetConstructorName(handle(object, isolate));
|
| }
|
|
|
|
|
|
|