File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
javascript/ql/lib/semmle/javascript/dataflow/internal Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -241,13 +241,8 @@ module CallGraph {
241
241
)
242
242
}
243
243
244
- private DataFlow:: FunctionNode getAMethodOnPlainObject ( DataFlow:: SourceNode node ) {
244
+ private DataFlow:: FunctionNode getAMethodOnObject ( DataFlow:: SourceNode node ) {
245
245
(
246
- (
247
- node instanceof DataFlow:: ObjectLiteralNode
248
- or
249
- node instanceof DataFlow:: FunctionNode
250
- ) and
251
246
result = node .getAPropertySource ( )
252
247
or
253
248
result = node .( DataFlow:: ObjectLiteralNode ) .getPropertyGetter ( _)
@@ -258,7 +253,7 @@ module CallGraph {
258
253
}
259
254
260
255
private predicate shouldTrackObjectWithMethods ( DataFlow:: SourceNode node ) {
261
- exists ( getAMethodOnPlainObject ( node ) )
256
+ exists ( getAMethodOnObject ( node ) )
262
257
}
263
258
264
259
/**
@@ -292,7 +287,7 @@ module CallGraph {
292
287
predicate impliedReceiverStep ( DataFlow:: SourceNode pred , DataFlow:: SourceNode succ ) {
293
288
exists ( DataFlow:: SourceNode host |
294
289
pred = getAnAllocationSiteRef ( host ) and
295
- succ = getAMethodOnPlainObject ( host ) .getReceiver ( )
290
+ succ = getAMethodOnObject ( host ) .getReceiver ( )
296
291
)
297
292
}
298
293
}
You can’t perform that action at this time.
0 commit comments