Skip to content

Commit b3eada8

Browse files
authored
Merge pull request #2690 from erik-krogh/MoreEvents2
Approved by asgerf
2 parents 5a2dfd4 + 8492f60 commit b3eada8

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

javascript/ql/src/semmle/javascript/frameworks/NodeJSLib.qll

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -919,17 +919,6 @@ module NodeJSLib {
919919
this.getASuperClassNode().getALocalSource() = getAnEventEmitterImport() or
920920
this.getADirectSuperClass() instanceof EventEmitterSubClass
921921
}
922-
923-
private DataFlow::SourceNode ref(DataFlow::TypeTracker t) {
924-
t.start() and result = this
925-
or
926-
exists (DataFlow::TypeTracker t2 | result = ref(t2).track(t2, t))
927-
}
928-
929-
/**
930-
* Gets a reference to this class.
931-
*/
932-
DataFlow::SourceNode ref() { result = ref(DataFlow::TypeTracker::end()) }
933922
}
934923

935924
/**
@@ -939,7 +928,7 @@ module NodeJSLib {
939928
*/
940929
private class CustomEventEmitter extends NodeJSEventEmitter {
941930
CustomEventEmitter() {
942-
this = any(EventEmitterSubClass clazz).ref().getAnInstantiation()
931+
this = any(EventEmitterSubClass clazz).getAClassReference().getAnInstantiation()
943932
}
944933
}
945934

0 commit comments

Comments
 (0)