Skip to content

Commit 66fc13a

Browse files
clover2123hs0225
authored andcommitted
chore: update escargot with bug fix
* 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]>
1 parent 3be4882 commit 66fc13a

File tree

7 files changed

+24
-17
lines changed

7 files changed

+24
-17
lines changed

.github/workflows/actions.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: lwnode actions
22
on: [ push, pull_request ]
33
jobs:
44
build_lwnode:
5-
runs-on: ubuntu-20.04
5+
runs-on: ubuntu-latest
66
timeout-minutes: 30
77
strategy:
88
fail-fast: false
99
matrix:
1010
config: [ '', '--nopt --shared' ]
1111
steps:
1212
- name: Checkout source
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
with:
1515
submodules: true
1616
- name: Checkout Escargot
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
pushd $(pwd)/deps/node
3232
./tools/test.py \
33-
-J -p dots --report --time --timeout 240 --repeat 1 \
33+
-J -p dots --report --time --timeout 300 --repeat 1 \
3434
--shell=../../out/linux/Release/lwnode \
3535
--skip-tests=$(sed 's/\s#.*//g' test/skip_tests.txt | paste -sd,) \
3636
--unsupported-tests=$(sed '/#\|^$/d' test/skip_features.txt | paste -sd,) \
@@ -45,7 +45,7 @@ jobs:
4545
timeout-minutes: 30
4646
steps:
4747
- name: Checkout source
48-
uses: actions/checkout@v2
48+
uses: actions/checkout@v4
4949
with:
5050
submodules: true
5151
- name: Checkout Escargot
@@ -85,7 +85,7 @@ jobs:
8585
profile: [t70std]
8686
steps:
8787
- name: Checkout source
88-
uses: actions/checkout@v2
88+
uses: actions/checkout@v4
8989
with:
9090
submodules: true
9191
- name: Checkout Escargot
@@ -118,8 +118,8 @@ jobs:
118118
fail-fast: false
119119
steps:
120120
- name: Checkout source
121-
uses: actions/checkout@v3
122-
- uses: actions/setup-python@v4
121+
uses: actions/checkout@v4
122+
- uses: actions/setup-python@v5
123123
with:
124124
python-version: '3.10'
125125
- name: Install Packages

deps/escargot

Submodule escargot updated 209 files

deps/node/test/skip_tests.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ test/parallel/test-whatwg-url-custom-properties.js
163163
test/parallel/test-worker-abort-on-uncaught-exception-terminate.js # randomly dies in docker
164164
test/parallel/test-worker-abort-on-uncaught-exception.js
165165
test/parallel/test-worker-cleanexit-with-moduleload.js
166+
test/parallel/test-worker-console-listeners.js # occasionally crashed in CI, might be timing issue
166167
test/parallel/test-worker-crypto-sign-transfer-result.js
167168
test/parallel/test-worker-data-url.js
168169
test/parallel/test-worker-error-stack-getter-throws.js
@@ -193,7 +194,9 @@ test/parallel/test-worker-nexttick-terminate.js
193194
test/parallel/test-worker-process-cwd.js
194195
test/parallel/test-worker-process-env.js
195196
test/parallel/test-worker-sharedarraybuffer-from-worker-thread.js
197+
test/parallel/test-worker-stack-overflow.js
196198
test/parallel/test-worker-stdio.js # CI 테스트중 간헐적으로 crash. 타이밍 이슈로 추정됨
199+
test/parallel/test-worker-stdio-from-preload-module.js # occasionally crashed in CI, might be timing issue
197200
test/parallel/test-worker-syntax-error-file.js
198201
test/parallel/test-worker-syntax-error.js
199202
test/parallel/test-worker-terminate-http2-respond-with-file.js

escargot.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
'escargot_configs': [
4848
'-DESCARGOT_SMALL_CONFIG=1',
4949
'-DESCARGOT_USE_CUSTOM_LOGGING=ON',
50+
'-DESCARGOT_USE_EXTENDED_API=ON',
5051
'-DESCARGOT_ARCH=<(target_arch)',
5152
'-DESCARGOT_HOST=<(build_host)',
5253
'-DESCARGOT_MODE=<(escargot_build_mode)',

src/api-data.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,14 +2314,14 @@ void String::ExternalStringResourceBase::operator delete(void* ptr) {
23142314

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

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

23272327
template <typename T, typename F>

src/api/es-helper.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,10 @@ EvalResult ObjectRefHelper::setPrototype(ContextRef* context,
345345
[](ExecutionStateRef* state,
346346
ObjectRef* object,
347347
ValueRef* prototype) -> ValueRef* {
348-
return ValueRef::create(object->setPrototype(state, prototype));
348+
// call ObjectRef::setObjectPrototype instead of ObjectRef::setPrototype
349+
// here because ImmutablePrototypeObject blocks __proto__ property
350+
// setting
351+
return ValueRef::create(object->setObjectPrototype(state, prototype));
349352
},
350353
object,
351354
prototype);

src/api/isolate.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ SymbolRef* IsolateWrap::createApiSymbol(StringRef* name) {
576576
auto newSymbol = SymbolRef::create(name);
577577
bool found = false;
578578
for (size_t i = 0; i < apiSymbols_.size(); i++) {
579-
if (apiSymbols_[i]->description()->equals(name)) {
579+
if (apiSymbols_[i]->descriptionString()->equals(name)) {
580580
apiSymbols_[i] = newSymbol;
581581
found = true;
582582
break;
@@ -596,7 +596,7 @@ SymbolRef* IsolateWrap::getApiSymbol(StringRef* name) {
596596
LWNODE_CALL_TRACE_ID(ISOWRAP);
597597

598598
for (auto apiSymbols : apiSymbols_) {
599-
if (apiSymbols->description()->equals(name)) {
599+
if (apiSymbols->descriptionString()->equals(name)) {
600600
return apiSymbols;
601601
}
602602
}
@@ -609,7 +609,7 @@ SymbolRef* IsolateWrap::createApiPrivateSymbol(StringRef* name) {
609609
auto newSymbol = SymbolRef::create(name);
610610
bool found = false;
611611
for (size_t i = 0; i < apiPrivateSymbols_.size(); i++) {
612-
if (apiPrivateSymbols_[i]->description()->equals(name)) {
612+
if (apiPrivateSymbols_[i]->descriptionString()->equals(name)) {
613613
apiPrivateSymbols_[i] = newSymbol;
614614
found = true;
615615
break;
@@ -630,7 +630,7 @@ SymbolRef* IsolateWrap::getApiPrivateSymbol(StringRef* name) {
630630
LWNODE_CALL_TRACE_ID(ISOWRAP);
631631

632632
for (auto apiPrivateSymbol : apiPrivateSymbols_) {
633-
if (apiPrivateSymbol->description()->equals(name)) {
633+
if (apiPrivateSymbol->descriptionString()->equals(name)) {
634634
return apiPrivateSymbol;
635635
}
636636
}

0 commit comments

Comments
 (0)