diff --git a/deps/escargot b/deps/escargot index 97e698db34..50aca7c2b4 160000 --- a/deps/escargot +++ b/deps/escargot @@ -1 +1 @@ -Subproject commit 97e698db347454bd11b7d58bae2d966f967739f1 +Subproject commit 50aca7c2b409f32e5f4c6fd7d7a53c53ae01f3d2 diff --git a/escargot.gyp b/escargot.gyp index 06397e373b..50edc7117e 100755 --- a/escargot.gyp +++ b/escargot.gyp @@ -47,6 +47,7 @@ 'escargot_configs': [ '-DESCARGOT_SMALL_CONFIG=1', '-DESCARGOT_USE_CUSTOM_LOGGING=ON', + '-DESCARGOT_USE_EXTENDED_API=ON', '-DESCARGOT_ARCH=<(target_arch)', '-DESCARGOT_HOST=<(build_host)', '-DESCARGOT_MODE=<(escargot_build_mode)', diff --git a/src/api-data.cc b/src/api-data.cc index 5d24ab5280..2044cd7370 100644 --- a/src/api-data.cc +++ b/src/api-data.cc @@ -2314,14 +2314,14 @@ void String::ExternalStringResourceBase::operator delete(void* ptr) { Local Symbol::Description() const { auto lwIsolate = IsolateWrap::GetCurrent(); - auto esDescription = CVAL(this)->value()->asSymbol()->description(); - return Utils::NewLocal(lwIsolate->toV8(), esDescription.get()); + auto esDescription = CVAL(this)->value()->asSymbol()->descriptionString(); + return Utils::NewLocal(lwIsolate->toV8(), esDescription); } Local Private::Name() const { auto lwIsolate = IsolateWrap::GetCurrent(); - auto esDescription = CVAL(this)->value()->asSymbol()->description(); - return Utils::NewLocal(lwIsolate->toV8(), esDescription.get()); + auto esDescription = CVAL(this)->value()->asSymbol()->descriptionString(); + return Utils::NewLocal(lwIsolate->toV8(), esDescription); } template diff --git a/src/api/es-helper.cc b/src/api/es-helper.cc index bf94fe538e..0ec3a0ae3b 100755 --- a/src/api/es-helper.cc +++ b/src/api/es-helper.cc @@ -345,7 +345,10 @@ EvalResult ObjectRefHelper::setPrototype(ContextRef* context, [](ExecutionStateRef* state, ObjectRef* object, ValueRef* prototype) -> ValueRef* { - return ValueRef::create(object->setPrototype(state, prototype)); + // call ObjectRef::setObjectPrototype instead of ObjectRef::setPrototype + // here because ImmutablePrototypeObject blocks __proto__ property + // setting + return ValueRef::create(object->setObjectPrototype(state, prototype)); }, object, prototype); diff --git a/src/api/isolate.cc b/src/api/isolate.cc index 81d820890f..6d45efb2ee 100755 --- a/src/api/isolate.cc +++ b/src/api/isolate.cc @@ -572,7 +572,7 @@ SymbolRef* IsolateWrap::createApiSymbol(StringRef* name) { auto newSymbol = SymbolRef::create(name); bool found = false; for (size_t i = 0; i < apiSymbols_.size(); i++) { - if (apiSymbols_[i]->description()->equals(name)) { + if (apiSymbols_[i]->descriptionString()->equals(name)) { apiSymbols_[i] = newSymbol; found = true; break; @@ -592,7 +592,7 @@ SymbolRef* IsolateWrap::getApiSymbol(StringRef* name) { LWNODE_CALL_TRACE_ID(ISOWRAP); for (auto apiSymbols : apiSymbols_) { - if (apiSymbols->description()->equals(name)) { + if (apiSymbols->descriptionString()->equals(name)) { return apiSymbols; } } @@ -605,7 +605,7 @@ SymbolRef* IsolateWrap::createApiPrivateSymbol(StringRef* name) { auto newSymbol = SymbolRef::create(name); bool found = false; for (size_t i = 0; i < apiPrivateSymbols_.size(); i++) { - if (apiPrivateSymbols_[i]->description()->equals(name)) { + if (apiPrivateSymbols_[i]->descriptionString()->equals(name)) { apiPrivateSymbols_[i] = newSymbol; found = true; break; @@ -626,7 +626,7 @@ SymbolRef* IsolateWrap::getApiPrivateSymbol(StringRef* name) { LWNODE_CALL_TRACE_ID(ISOWRAP); for (auto apiPrivateSymbol : apiPrivateSymbols_) { - if (apiPrivateSymbol->description()->equals(name)) { + if (apiPrivateSymbol->descriptionString()->equals(name)) { return apiPrivateSymbol; } }