JS: Avoid redundant window.name sources

This commit is contained in:
Asger F
2019-11-19 15:05:09 +00:00
parent 8a8b795696
commit 605c8834c6
2 changed files with 1 additions and 8 deletions

View File

@@ -211,7 +211,7 @@ private class WindowNameAccess extends RemoteFlowSource {
this = DataFlow::globalObjectRef().getAPropertyRead("name")
or
// Reference to `name` on a container that does not assign to it.
this.accessesGlobal("name") and
this.asExpr().(GlobalVarAccess).getName() = "name" and
not exists(VarDef def |
def.getAVariable().(GlobalVariable).getName() = "name" and
def.getContainer() = this.asExpr().getContainer()