Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 06373d2d8a39f62c0f98db6fd4978270f486f350..817a897399a6d64bbeac5ad59b3108a20674321e 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; |
} |