File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
javascript/ql/src/semmle/javascript/dataflow/internal Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -119,12 +119,23 @@ private module CachedSteps {
119119 predicate calls ( DataFlow:: InvokeNode invk , Function f ) {
120120 f = invk .getACallee ( 0 )
121121 or
122- exists ( DataFlow:: ClassNode cls , string name |
123- callResolvesToMember ( invk , cls , name ) and
124- f = cls .getInstanceMethod ( name ) .getFunction ( )
122+ exists ( DataFlow:: ClassNode cls |
123+ // Call to class member
124+ exists ( string name |
125+ callResolvesToMember ( invk , cls , name ) and
126+ f = cls .getInstanceMethod ( name ) .getFunction ( )
127+ or
128+ invk = cls .getAClassReference ( ) .getAMethodCall ( name ) and
129+ f = cls .getStaticMethod ( name ) .getFunction ( )
130+ )
131+ or
132+ // Call to constructor
133+ invk = cls .getAClassReference ( ) .getAnInvocation ( ) and
134+ f = cls .getConstructor ( ) .getFunction ( )
125135 or
126- invk = cls .getAClassReference ( ) .getAMethodCall ( name ) and
127- f = cls .getStaticMethod ( name ) .getFunction ( )
136+ // Super call to constructor
137+ invk .asExpr ( ) .( SuperCall ) .getBinder ( ) = cls .getConstructor ( ) .getFunction ( ) and
138+ f = cls .getADirectSuperClass ( ) .getConstructor ( ) .getFunction ( )
128139 )
129140 or
130141 // Call from `foo.bar.baz()` to `foo.bar.baz = function()`
You can’t perform that action at this time.
0 commit comments