Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index f7c89175da75c2fb7916015a34adf9954b565eef..85ae8fe54e87075ef8cf34b9b8749a8bde9caec9 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1669,10 +1669,14 @@ void HeapObject::HeapObjectShortPrint(StringStream* accumulator) { |
} |
case SYMBOL_TYPE: { |
Symbol* symbol = Symbol::cast(this); |
- accumulator->Add("<Symbol: %d", symbol->Hash()); |
- if (!symbol->name()->IsUndefined()) { |
+ accumulator->Add("<"); |
+ accumulator->Add(symbol->IsPrivate() ? "Private" : "Symbol"); |
+ accumulator->Add(": %d", symbol->Hash()); |
+ Object* name = |
+ symbol->IsPrivate() ? Private::cast(symbol)->name() : symbol->name(); |
+ if (!name->IsUndefined()) { |
accumulator->Add(" "); |
- String::cast(symbol->name())->StringShortPrint(accumulator); |
+ String::cast(name)->StringShortPrint(accumulator); |
} |
accumulator->Add(">"); |
break; |