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

Unified Diff: src/isolate.cc

Issue 2900703002: [es2015] Precompute the descriptive string for symbols. (Closed)
Patch Set: Address feedback. Created 3 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/heap/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index faa04848cff43c13c49ff5837ecb6718deac3822..5d4946f520c2de88a6e5fada0c66ed6ff87b91f5 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -3270,9 +3270,8 @@ Handle<Symbol> Isolate::SymbolFor(Heap::RootListIndex dictionary_index,
int entry = dictionary->FindEntry(key);
Handle<Symbol> symbol;
if (entry == NameDictionary::kNotFound) {
- symbol =
- private_symbol ? factory()->NewPrivateSymbol() : factory()->NewSymbol();
- symbol->set_name(*key);
+ symbol = private_symbol ? factory()->NewPrivateSymbol(key).ToHandleChecked()
+ : factory()->NewSymbol(key).ToHandleChecked();
dictionary = NameDictionary::Add(dictionary, key, symbol,
PropertyDetails::Empty(), &entry);
switch (dictionary_index) {
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698