We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5d014b commit 4ab7aceCopy full SHA for 4ab7ace
javascript/ql/lib/semmle/javascript/dataflow/internal/CallGraphs.qll
@@ -249,7 +249,13 @@ module CallGraph {
249
or
250
result = node.(DataFlow::ObjectLiteralNode).getPropertySetter(_)
251
) and
252
- not node.getTopLevel().isExterns()
+ not node.getTopLevel().isExterns() and
253
+ // Do not track instance methods on classes
254
+ not exists(DataFlow::ClassNode cls |
255
+ node = cls.getConstructor().getReceiver()
256
+ or
257
+ node = cls.(DataFlow::ClassNode::FunctionStyleClass).getAPrototypeReference()
258
+ )
259
}
260
261
private predicate shouldTrackObjectWithMethods(DataFlow::SourceNode node) {
0 commit comments