Index: src/runtime/runtime-symbol.cc |
diff --git a/src/runtime/runtime-symbol.cc b/src/runtime/runtime-symbol.cc |
index 778c2417095ba7ed96c272dc8ffa7f16eea1f53a..234b45606d8332c4a0bfc4ad41c4843205ad6377 100644 |
--- a/src/runtime/runtime-symbol.cc |
+++ b/src/runtime/runtime-symbol.cc |
@@ -28,7 +28,9 @@ RUNTIME_FUNCTION(Runtime_CreatePrivateSymbol) { |
DCHECK(args.length() == 1); |
CONVERT_ARG_HANDLE_CHECKED(Object, name, 0); |
RUNTIME_ASSERT(name->IsString() || name->IsUndefined()); |
- return *isolate->factory()->NewPrivateSymbol(name); |
+ Handle<Symbol> symbol = isolate->factory()->NewPrivateSymbol(); |
+ if (name->IsString()) symbol->set_name(*name); |
+ return *symbol; |
} |