File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -492,6 +492,7 @@ module DataFlow {
492492 * Gets the data flow node corresponding to the base object
493493 * whose property is read from or written to.
494494 */
495+ cached
495496 abstract Node getBase ( ) ;
496497
497498 /**
@@ -595,7 +596,10 @@ module DataFlow {
595596
596597 PropLValueAsPropWrite ( ) { astNode instanceof LValue }
597598
598- override Node getBase ( ) { result = valueNode ( astNode .getBase ( ) ) }
599+ override Node getBase ( ) {
600+ result = valueNode ( astNode .getBase ( ) ) and
601+ Stages:: DataFlowStage:: ref ( )
602+ }
599603
600604 override Expr getPropertyNameExpr ( ) { result = astNode .getPropertyNameExpr ( ) }
601605
Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ module Stages {
133133 exists ( any ( DataFlow:: Node node ) .toString ( ) )
134134 or
135135 exists ( any ( AccessPath a ) .getAnInstanceIn ( _) )
136+ or
137+ exists ( any ( DataFlow:: PropRef ref ) .getBase ( ) )
136138 }
137139 }
138140
You can’t perform that action at this time.
0 commit comments