Skip to content

Commit

Permalink
chore: update escargot with bug fix
Browse files Browse the repository at this point in the history
* update the latest escargot and walrus module
* fix misc bugs related with escargot update
* use ESCARGOT_USE_EXTENDED_API and relevant APIs

Signed-off-by: HyukWoo Park <[email protected]>
  • Loading branch information
clover2123 authored and hs0225 committed Jul 3, 2024
1 parent 3be4882 commit 66fc13a
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 17 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: lwnode actions
on: [ push, pull_request ]
jobs:
build_lwnode:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
config: [ '', '--nopt --shared' ]
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
- name: Checkout Escargot
Expand All @@ -30,7 +30,7 @@ jobs:
run: |
pushd $(pwd)/deps/node
./tools/test.py \
-J -p dots --report --time --timeout 240 --repeat 1 \
-J -p dots --report --time --timeout 300 --repeat 1 \
--shell=../../out/linux/Release/lwnode \
--skip-tests=$(sed 's/\s#.*//g' test/skip_tests.txt | paste -sd,) \
--unsupported-tests=$(sed '/#\|^$/d' test/skip_features.txt | paste -sd,) \
Expand All @@ -45,7 +45,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
- name: Checkout Escargot
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
profile: [t70std]
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true
- name: Checkout Escargot
Expand Down Expand Up @@ -118,8 +118,8 @@ jobs:
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@v3
- uses: actions/setup-python@v4
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Packages
Expand Down
2 changes: 1 addition & 1 deletion deps/escargot
Submodule escargot updated 209 files
3 changes: 3 additions & 0 deletions deps/node/test/skip_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ test/parallel/test-whatwg-url-custom-properties.js
test/parallel/test-worker-abort-on-uncaught-exception-terminate.js # randomly dies in docker
test/parallel/test-worker-abort-on-uncaught-exception.js
test/parallel/test-worker-cleanexit-with-moduleload.js
test/parallel/test-worker-console-listeners.js # occasionally crashed in CI, might be timing issue
test/parallel/test-worker-crypto-sign-transfer-result.js
test/parallel/test-worker-data-url.js
test/parallel/test-worker-error-stack-getter-throws.js
Expand Down Expand Up @@ -193,7 +194,9 @@ test/parallel/test-worker-nexttick-terminate.js
test/parallel/test-worker-process-cwd.js
test/parallel/test-worker-process-env.js
test/parallel/test-worker-sharedarraybuffer-from-worker-thread.js
test/parallel/test-worker-stack-overflow.js
test/parallel/test-worker-stdio.js # CI 테스트중 간헐적으로 crash. 타이밍 이슈로 추정됨
test/parallel/test-worker-stdio-from-preload-module.js # occasionally crashed in CI, might be timing issue
test/parallel/test-worker-syntax-error-file.js
test/parallel/test-worker-syntax-error.js
test/parallel/test-worker-terminate-http2-respond-with-file.js
Expand Down
1 change: 1 addition & 0 deletions escargot.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
8 changes: 4 additions & 4 deletions src/api-data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2314,14 +2314,14 @@ void String::ExternalStringResourceBase::operator delete(void* ptr) {

Local<Value> Symbol::Description() const {
auto lwIsolate = IsolateWrap::GetCurrent();
auto esDescription = CVAL(this)->value()->asSymbol()->description();
return Utils::NewLocal<String>(lwIsolate->toV8(), esDescription.get());
auto esDescription = CVAL(this)->value()->asSymbol()->descriptionString();
return Utils::NewLocal<String>(lwIsolate->toV8(), esDescription);
}

Local<Value> Private::Name() const {
auto lwIsolate = IsolateWrap::GetCurrent();
auto esDescription = CVAL(this)->value()->asSymbol()->description();
return Utils::NewLocal<String>(lwIsolate->toV8(), esDescription.get());
auto esDescription = CVAL(this)->value()->asSymbol()->descriptionString();
return Utils::NewLocal<String>(lwIsolate->toV8(), esDescription);
}

template <typename T, typename F>
Expand Down
5 changes: 4 additions & 1 deletion src/api/es-helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/api/isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,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;
Expand All @@ -596,7 +596,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;
}
}
Expand All @@ -609,7 +609,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;
Expand All @@ -630,7 +630,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;
}
}
Expand Down

0 comments on commit 66fc13a

Please sign in to comment.