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

Unified Diff: src/api.cc

Issue 722723002: Move public symbols to the root set. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/accessors.cc ('k') | src/ast-value-factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index dfb452b2a2707f1a697cc248bcff8b8a3c995b84..c7ebc7714f57a052f99964e44e412a2d66770c7d 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6227,27 +6227,21 @@ Local<Symbol> v8::Symbol::ForApi(Isolate* isolate, Local<String> name) {
}
-static Local<Symbol> GetWellKnownSymbol(Isolate* isolate, const char* name) {
- i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
- i::Handle<i::String> i_name =
- Utils::OpenHandle(*String::NewFromUtf8(isolate, name));
- i::Handle<i::String> part = i_isolate->factory()->for_intern_string();
- return Utils::ToLocal(SymbolFor(i_isolate, i_name, part));
-}
-
-
Local<Symbol> v8::Symbol::GetIterator(Isolate* isolate) {
- return GetWellKnownSymbol(isolate, "Symbol.iterator");
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ return Utils::ToLocal(i_isolate->factory()->iterator_symbol());
}
Local<Symbol> v8::Symbol::GetUnscopables(Isolate* isolate) {
- return GetWellKnownSymbol(isolate, "Symbol.unscopables");
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ return Utils::ToLocal(i_isolate->factory()->unscopables_symbol());
}
Local<Symbol> v8::Symbol::GetToStringTag(Isolate* isolate) {
- return GetWellKnownSymbol(isolate, "Symbol.toStringTag");
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ return Utils::ToLocal(i_isolate->factory()->to_string_tag_symbol());
}
« no previous file with comments | « src/accessors.cc ('k') | src/ast-value-factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698