Merge pull request #2690 from erik-krogh/MoreEvents2

Approved by asgerf
This commit is contained in:
semmle-qlci
2020-01-24 14:47:04 +00:00
committed by GitHub

View File

@@ -919,17 +919,6 @@ module NodeJSLib {
this.getASuperClassNode().getALocalSource() = getAnEventEmitterImport() or
this.getADirectSuperClass() instanceof EventEmitterSubClass
}
private DataFlow::SourceNode ref(DataFlow::TypeTracker t) {
t.start() and result = this
or
exists (DataFlow::TypeTracker t2 | result = ref(t2).track(t2, t))
}
/**
* Gets a reference to this class.
*/
DataFlow::SourceNode ref() { result = ref(DataFlow::TypeTracker::end()) }
}
/**
@@ -939,7 +928,7 @@ module NodeJSLib {
*/
private class CustomEventEmitter extends NodeJSEventEmitter {
CustomEventEmitter() {
this = any(EventEmitterSubClass clazz).ref().getAnInstantiation()
this = any(EventEmitterSubClass clazz).getAClassReference().getAnInstantiation()
}
}