Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 498e4d2

Browse files
committed
JS: Avoid materializing DataFlow::Node.getFile
1 parent d8165d0 commit 498e4d2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

javascript/ql/src/semmle/javascript/GlobalAccessPaths.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ module GlobalAccessPath {
112112
exists(DataFlow::Node rhs |
113113
fromRhs(rhs) = accessPath and
114114
not isSelfAssignment(rhs) and
115-
rhs.getFile() = file
115+
// Note: Avoid unneeded materialization of DataFlow::Node.getFile()
116+
rhs.getAstNode().getFile() = file
116117
)
117118
}
118119

0 commit comments

Comments
 (0)