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

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

Issue 1182303004: All private symbols are own symbols (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Fix nits Created 5 years, 6 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
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/private.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-symbol.cc
diff --git a/src/runtime/runtime-symbol.cc b/src/runtime/runtime-symbol.cc
index 7ff7eb96436a25b25f1227bd60ee7ceeb2a91a08..412ee0ae3158e04a8fb8727963fd3ad7eaaee6e4 100644
--- a/src/runtime/runtime-symbol.cc
+++ b/src/runtime/runtime-symbol.cc
@@ -26,22 +26,11 @@ RUNTIME_FUNCTION(Runtime_CreatePrivateSymbol) {
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(Object, name, 0);
RUNTIME_ASSERT(name->IsString() || name->IsUndefined());
- Handle<Symbol> symbol = isolate->factory()->NewPrivateSymbol();
- if (name->IsString()) symbol->set_name(*name);
- return *symbol;
-}
-
-
-RUNTIME_FUNCTION(Runtime_CreatePrivateOwnSymbol) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(Object, name, 0);
- RUNTIME_ASSERT(name->IsString() || name->IsUndefined());
- return *isolate->factory()->NewPrivateOwnSymbol(name);
+ return *isolate->factory()->NewPrivateSymbol(name);
}
-RUNTIME_FUNCTION(Runtime_CreateGlobalPrivateOwnSymbol) {
+RUNTIME_FUNCTION(Runtime_CreateGlobalPrivateSymbol) {
HandleScope scope(isolate);
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
@@ -55,7 +44,7 @@ RUNTIME_FUNCTION(Runtime_CreateGlobalPrivateOwnSymbol) {
Object::GetProperty(privates, name));
if (!symbol->IsSymbol()) {
DCHECK(symbol->IsUndefined());
- symbol = isolate->factory()->NewPrivateOwnSymbol(name);
+ symbol = isolate->factory()->NewPrivateSymbol(name);
JSObject::AddProperty(Handle<JSObject>::cast(privates), name, symbol, NONE);
}
return *symbol;
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/private.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698