File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -244,18 +244,4 @@ module Closure {
244244 DataFlow:: SourceNode moduleImport ( string moduleName ) {
245245 getClosureNamespaceFromSourceNode ( result ) = moduleName
246246 }
247-
248- private class ClosureNamespaceCall extends DataFlow:: InvokeNode {
249- override Function getACallee ( int imprecision ) {
250- result = super .getACallee ( imprecision )
251- or
252- imprecision = 0 and
253- exists ( string name |
254- GlobalAccessPath:: isAssignedInUniqueFile ( name ) and
255- GlobalAccessPath:: fromRhs ( result .flow ( ) ) = name and
256- GlobalAccessPath:: fromReference ( getCalleeNode ( ) ) = name and
257- not result .getTopLevel ( ) .isExterns ( )
258- )
259- }
260- }
261247}
Original file line number Diff line number Diff line change @@ -127,6 +127,14 @@ private module CachedSteps {
127127 invk = cls .getAClassReference ( ) .getAMethodCall ( name ) and
128128 f = cls .getStaticMethod ( name ) .getFunction ( )
129129 )
130+ or
131+ // Call from `foo.bar.baz()` to `foo.bar.baz = function()`
132+ not f .getTopLevel ( ) .isExterns ( ) and
133+ exists ( string name |
134+ GlobalAccessPath:: isAssignedInUniqueFile ( name ) and
135+ GlobalAccessPath:: fromRhs ( f .flow ( ) ) = name and
136+ GlobalAccessPath:: fromReference ( invk .getCalleeNode ( ) ) = name
137+ )
130138 }
131139
132140 /**
You can’t perform that action at this time.
0 commit comments