Skip to content

Commit 7d888ff

Browse files
deps: V8: cherry-pick 6e5e1053fa61
Original commit message: Merged: [parser] Using FunctionParsingScope for parsing class static blocks Class static blocks contain statements, don't inherit the ExpressionScope stack. (cherry picked from commit 3e037e195e508dea045f5626862412e8f64fc919) Bug: 341663589 Change-Id: Ice9a710293b028e5d9fd30d5d85c4842f970b152 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5558360 Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/branch-heads/12.4@{nodejs#38} Cr-Branched-From: 309640da62fae0485c7e4f64829627c92d53b35d-refs/heads/12.4.254@{nodejs#1} Cr-Branched-From: 5dc24701432278556a9829d27c532f974643e6df-refs/heads/main@{#92862} Refs: v8/v8@6e5e105
1 parent 0092358 commit 7d888ff

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.37',
39+
'v8_embedder_string': '-node.38',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/ast/scopes.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2397,7 +2397,7 @@ bool Scope::MustAllocate(Variable* var) {
23972397
var->set_is_used();
23982398
if (inner_scope_calls_eval_ && !var->is_this()) var->SetMaybeAssigned();
23992399
}
2400-
DCHECK(!var->has_forced_context_allocation() || var->is_used());
2400+
CHECK(!var->has_forced_context_allocation() || var->is_used());
24012401
// Global variables do not need to be allocated.
24022402
return !var->IsGlobalObjectProperty() && var->is_used();
24032403
}

deps/v8/src/parsing/parser-base.h

+1
Original file line numberDiff line numberDiff line change
@@ -2562,6 +2562,7 @@ typename ParserBase<Impl>::BlockT ParserBase<Impl>::ParseClassStaticBlock(
25622562
}
25632563

25642564
FunctionState initializer_state(&function_state_, &scope_, initializer_scope);
2565+
FunctionParsingScope body_parsing_scope(impl());
25652566
AcceptINScope accept_in(this, true);
25662567

25672568
// Each static block has its own var and lexical scope, so make a new var

0 commit comments

Comments
 (0)