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

Unified Diff: src/factory.cc

Issue 1149863005: Move hash code from hidden string to a private symbol (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 years, 7 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/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698