Skip to content

Commit f79c2a7

Browse files
authored
Merge pull request #2224 from asger-semmle/access-paths-with-source-node-root
Approved by max-schaefer
2 parents 9ffb67a + 81723ab commit f79c2a7

10 files changed

Lines changed: 345 additions & 105 deletions

File tree

javascript/ql/src/semmle/javascript/Closure.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ module Closure {
230230
* Gets the closure namespace path addressed by the given data flow node, if any.
231231
*/
232232
string getClosureNamespaceFromSourceNode(DataFlow::SourceNode node) {
233-
result = GlobalAccessPath::getAccessPath(node) and
233+
node = AccessPath::getAReferenceOrAssignmentTo(result) and
234234
hasClosureNamespacePrefix(result)
235235
}
236236

237237
/**
238238
* Gets the closure namespace path written to by the given property write, if any.
239239
*/
240240
string getWrittenClosureNamespace(DataFlow::PropWrite node) {
241-
result = GlobalAccessPath::fromRhs(node.getRhs()) and
241+
node.getRhs() = AccessPath::getAnAssignmentTo(result) and
242242
hasClosureNamespacePrefix(result)
243243
}
244244

0 commit comments

Comments
 (0)