Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Unified Diff: src/runtime/runtime-symbol.cc

Issue 1428793002: Reland v8::Private and related APIs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698