mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
JavaScript: Improve API-graph support for function-style classes.
This commit is contained in:
@@ -547,7 +547,11 @@ module API {
|
||||
ref = DataFlow::moduleImport(m)
|
||||
)
|
||||
or
|
||||
exists(DataFlow::ClassNode cls | nd = MkClassInstance(cls) | ref = cls.getAReceiverNode())
|
||||
exists(DataFlow::ClassNode cls | nd = MkClassInstance(cls) |
|
||||
ref = cls.getAReceiverNode()
|
||||
or
|
||||
ref = cls.(DataFlow::ClassNode::FunctionStyleClass).getAPrototypeReference()
|
||||
)
|
||||
or
|
||||
nd = MkUse(ref)
|
||||
or
|
||||
|
||||
@@ -20,4 +20,8 @@ MyOtherStream.prototype.write = function (data) { /* use (instance (member MyOth
|
||||
return this;
|
||||
};
|
||||
|
||||
MyOtherStream.prototype.instanceProp = 1; /* def (member instanceProp (instance (member MyOtherStream (member exports (module classes))))) */
|
||||
|
||||
MyOtherStream.classProp = 1; /* def (member classProp (member MyOtherStream (member exports (module classes)))) */
|
||||
|
||||
module.exports.MyOtherStream = MyOtherStream;
|
||||
|
||||
Reference in New Issue
Block a user