Skip to content

Commit 8e203e7

Browse files
committed
add locking
1 parent e5d6bde commit 8e203e7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/checker/emitresolver.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@ func (r *emitResolver) IsExpandoFunctionDeclaration(node *ast.Node) bool {
609609
return false
610610
}
611611

612+
r.checkerMu.Lock()
613+
defer r.checkerMu.Unlock()
614+
612615
var symbol *ast.Symbol
613616
if ast.IsVariableDeclaration(node) {
614617
if node.Type() != nil || (!ast.IsInJSFile(node) && !ast.IsVarConstLike(node)) {
@@ -887,6 +890,9 @@ func (r *emitResolver) GetPropertiesOfContainerFunction(node *ast.Node) []*ast.S
887890
}
888891

889892
if ast.IsFunctionDeclaration(node) {
893+
r.checkerMu.Lock()
894+
defer r.checkerMu.Unlock()
895+
890896
symbol := r.checker.getSymbolOfDeclaration(node)
891897
if symbol == nil {
892898
return props

0 commit comments

Comments
 (0)