Skip to content

Commit 485879f

Browse files
legendecastargos
authored andcommitted
deps: V8: cherry-pick ff34ae20c8e3
Original commit message: [objects] improve module linked status DCHECKs Improve DCHECKs that requires a module to be linked. This includes kLinked, kEvaluated, kEvaluatingAsync, kErrored and the missing kEvaluating. kEvaluating can be found when a cyclic module is been evaluated synchronously. Refs: nodejs#60111 (comment) Change-Id: Ie0b9be22f2d3b8208571d8b419da3505b9f57b65 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7031498 Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Chengzhong Wu <cwu631@bloomberg.net> Cr-Commit-Position: refs/heads/main@{#103203} Refs: v8/v8@ff34ae2 PR-URL: nodejs#60111 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 0b0be70 commit 485879f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.8',
41+
'v8_embedder_string': '-node.9',
4242

4343
##### V8 defaults for Node.js #####
4444

deps/v8/src/objects/module.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,7 @@ bool Module::Instantiate(Isolate* isolate, Handle<Module> module,
223223
DCHECK_EQ(module->status(), kUnlinked);
224224
return false;
225225
}
226-
DCHECK(module->status() == kLinked || module->status() == kEvaluated ||
227-
module->status() == kEvaluatingAsync || module->status() == kErrored);
226+
DCHECK_GE(module->status(), kLinked);
228227
DCHECK(stack.empty());
229228
return true;
230229
}
@@ -488,8 +487,7 @@ bool Module::IsGraphAsync(Isolate* isolate) const {
488487
// Only SourceTextModules may be async.
489488
if (!IsSourceTextModule(*this)) return false;
490489
Tagged<SourceTextModule> root = Cast<SourceTextModule>(*this);
491-
DCHECK(root->status() == kLinked || root->status() == kEvaluated ||
492-
root->status() == kEvaluatingAsync || root->status() == kErrored);
490+
DCHECK_GE(root->status(), kLinked);
493491

494492
Zone zone(isolate->allocator(), ZONE_NAME);
495493
const size_t bucket_count = 2;

0 commit comments

Comments
 (0)