mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Merge pull request #2690 from erik-krogh/MoreEvents2
Approved by asgerf
This commit is contained in:
@@ -919,17 +919,6 @@ module NodeJSLib {
|
|||||||
this.getASuperClassNode().getALocalSource() = getAnEventEmitterImport() or
|
this.getASuperClassNode().getALocalSource() = getAnEventEmitterImport() or
|
||||||
this.getADirectSuperClass() instanceof EventEmitterSubClass
|
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 {
|
private class CustomEventEmitter extends NodeJSEventEmitter {
|
||||||
CustomEventEmitter() {
|
CustomEventEmitter() {
|
||||||
this = any(EventEmitterSubClass clazz).ref().getAnInstantiation()
|
this = any(EventEmitterSubClass clazz).getAClassReference().getAnInstantiation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user