From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- js/src/frontend/Stencil.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/src/frontend/Stencil.cpp') diff --git a/js/src/frontend/Stencil.cpp b/js/src/frontend/Stencil.cpp index 7c6eba4c5a..30d1588415 100644 --- a/js/src/frontend/Stencil.cpp +++ b/js/src/frontend/Stencil.cpp @@ -575,7 +575,7 @@ void ScopeContext::cacheEnclosingScope(const InputScope& enclosingScope) { } bool hasEnv = si.hasSyntacticEnvironment(); - auto setCacthAll = [&](NameLocation loc) { + auto setCatchAll = [&](NameLocation loc) { return si.scope().match([&](auto& scope_ref) { using BindingMapPtr = decltype(scopeCache->createCacheFor(scope_ref)); BindingMapPtr bindingMapPtr = scopeCache->createCacheFor(scope_ref); @@ -604,7 +604,7 @@ void ScopeContext::cacheEnclosingScope(const InputScope& enclosingScope) { case ScopeKind::Function: if (hasEnv) { if (si.scope().funHasExtensibleScope()) { - setCacthAll(NameLocation::Dynamic()); + setCatchAll(NameLocation::Dynamic()); return; } @@ -733,21 +733,21 @@ void ScopeContext::cacheEnclosingScope(const InputScope& enclosingScope) { if (!hasEnv) { ScopeKind kind = si.scope().enclosing().kind(); if (kind == ScopeKind::Global || kind == ScopeKind::NonSyntactic) { - setCacthAll(NameLocation::Global(BindingKind::Var)); + setCatchAll(NameLocation::Global(BindingKind::Var)); return; } } - setCacthAll(NameLocation::Dynamic()); + setCatchAll(NameLocation::Dynamic()); return; case ScopeKind::Global: - setCacthAll(NameLocation::Global(BindingKind::Var)); + setCatchAll(NameLocation::Global(BindingKind::Var)); return; case ScopeKind::With: case ScopeKind::NonSyntactic: - setCacthAll(NameLocation::Dynamic()); + setCatchAll(NameLocation::Dynamic()); return; case ScopeKind::WasmInstance: -- cgit v1.2.3