mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JavaScript: address comments
This commit is contained in:
@@ -337,7 +337,7 @@ private class LibraryPartialCall extends AdditionalPartialInvokeNode {
|
||||
override predicate isPartialArgument(DataFlow::Node callback, DataFlow::Node argument, int index) {
|
||||
callback = getArgument(0) and
|
||||
exists (DataFlow::ArrayLiteralNode array |
|
||||
array = getArgument(1) and
|
||||
array.flowsTo(getArgument(1)) and
|
||||
argument = array.getElement(index))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ predicate calls(DataFlow::InvokeNode invk, Function f) {
|
||||
*
|
||||
* This only holds for explicitly modeled partial calls.
|
||||
*/
|
||||
predicate partiallyCalls(DataFlow::AdditionalPartialInvokeNode invk, DataFlow::Node callback, Function f) {
|
||||
private predicate partiallyCalls(DataFlow::AdditionalPartialInvokeNode invk, DataFlow::AnalyzedNode callback, Function f) {
|
||||
invk.isPartialArgument(callback, _, _) and
|
||||
exists (AbstractFunction callee | callee = callback.analyze().getAValue() |
|
||||
exists (AbstractFunction callee | callee = callback.getAValue() |
|
||||
if invk.isIndefinite("global") then
|
||||
(f = callee.getFunction() and f.getFile() = invk.getFile())
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user