Index: src/profile-generator.cc |
diff --git a/src/profile-generator.cc b/src/profile-generator.cc |
index a33e9045244280a8034cf658b36f2242feb7c30c..9a91ad670ab56658efc0939c0ea060d1a480a47a 100644 |
--- a/src/profile-generator.cc |
+++ b/src/profile-generator.cc |
@@ -2300,11 +2300,12 @@ String* V8HeapExplorer::GetConstructorName(JSObject* object) { |
Object* constructor_prop = NULL; |
LookupResult result(heap->isolate()); |
object->LocalLookupRealNamedProperty(heap->constructor_symbol(), &result); |
- if (result.IsProperty()) { |
- constructor_prop = result.GetLazyValue(); |
- } |
+ if (!result.IsFound()) return object->constructor_name(); |
+ |
+ constructor_prop = result.GetLazyValue(); |
if (constructor_prop->IsJSFunction()) { |
- Object* maybe_name = JSFunction::cast(constructor_prop)->shared()->name(); |
+ Object* maybe_name = |
+ JSFunction::cast(constructor_prop)->shared()->name(); |
if (maybe_name->IsString()) { |
String* name = String::cast(maybe_name); |
if (name->length() > 0) return name; |