Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 59ab64dbe5d723516e5e13a0f6ecff6005adccfc..fc8919c648dcee78318d29611a7fa6d100daafc2 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -705,10 +705,15 @@ Handle<Symbol> Factory::NewPrivateSymbol() { |
} |
-Handle<Symbol> Factory::NewPrivateOwnSymbol() { |
+Handle<Symbol> Factory::NewPrivateOwnSymbol(Handle<Object> name) { |
Handle<Symbol> symbol = NewSymbol(); |
symbol->set_is_private(true); |
symbol->set_is_own(true); |
+ if (name->IsString()) { |
+ symbol->set_name(*name); |
+ } else { |
+ DCHECK(name->IsUndefined()); |
+ } |
return symbol; |
} |