JavaScript: Address review comments.

This commit is contained in:
Max Schaefer
2020-12-03 10:21:21 +00:00
parent c9132ca6f8
commit f40b406a2d

View File

@@ -703,7 +703,7 @@ module API {
boundArgs = 0
or
exists(DataFlow::CallNode promisify |
promisify = API::moduleImport(["util", "bluebird"]).getMember("promisify").getACall()
promisify = DataFlow::moduleImport(["util", "bluebird"]).getAMemberCall("promisify")
|
trackUseNode(nd, false, boundArgs, t.continue()).flowsTo(promisify.getArgument(0)) and
promisified = true and
@@ -713,7 +713,7 @@ module API {
exists(DataFlow::PartialInvokeNode pin, DataFlow::Node pred, int predBoundArgs |
trackUseNode(nd, promisified, predBoundArgs, t.continue()).flowsTo(pred) and
result = pin.getBoundFunction(pred, boundArgs - predBoundArgs) and
boundArgs <= 10
boundArgs in [0 .. 10]
)
or
exists(StepSummary summary |
@@ -779,7 +779,8 @@ module API {
private DataFlow::SourceNode awaited(DataFlow::InvokeNode call, DataFlow::TypeTracker t) {
t.startInPromise() and
exists(MkSyntheticCallbackArg(_, _, call))
exists(MkSyntheticCallbackArg(_, _, call)) and
result = call
or
exists(DataFlow::TypeTracker t2 | result = awaited(call, t2).track(t2, t))
}