Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: src/profiler/heap-snapshot-generator.cc

Issue 1435273002: Fix name shown by devtools for subclasses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-printer.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/heap-snapshot-generator.cc
diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc
index 322b164c5ea74be1c6b6a2c244df942be95c3ee4..21c03a1b282a85a139762a67d626b13a4067c79d 100644
--- a/src/profiler/heap-snapshot-generator.cc
+++ b/src/profiler/heap-snapshot-generator.cc
@@ -1724,14 +1724,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));
}
« no previous file with comments | « src/objects-printer.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698