Exposes Symbol.toPrimitive in C++ APIs as Symbol::GetToPrimitive.

As Blink needs to set Symbol.toPrimitive, exposes the symbol in C++ APIs
as Symbol::GetToPrimitive.

BUG=chromium:680409

Review-Url: https://codereview.chromium.org/2657933003
Cr-Commit-Position: refs/heads/master@{#42724}
This commit is contained in:
yukishiino 2017-01-26 23:29:15 -08:00 committed by Commit bot
parent b362609efe
commit 34bee46b0b
2 changed files with 5 additions and 0 deletions

View File

@ -2710,6 +2710,7 @@ class V8_EXPORT Symbol : public Name {
// Well-known symbols
static Local<Symbol> GetIterator(Isolate* isolate);
static Local<Symbol> GetUnscopables(Isolate* isolate);
static Local<Symbol> GetToPrimitive(Isolate* isolate);
static Local<Symbol> GetToStringTag(Isolate* isolate);
static Local<Symbol> GetIsConcatSpreadable(Isolate* isolate);

View File

@ -7834,6 +7834,10 @@ Local<Symbol> v8::Symbol::GetUnscopables(Isolate* isolate) {
return Utils::ToLocal(i_isolate->factory()->unscopables_symbol());
}
Local<Symbol> v8::Symbol::GetToPrimitive(Isolate* isolate) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
return Utils::ToLocal(i_isolate->factory()->to_primitive_symbol());
}
Local<Symbol> v8::Symbol::GetToStringTag(Isolate* isolate) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);