Merge pull request #19129 from Napalys/js/readfile_async

JS: Add support for `async` `readFile`
This commit is contained in:
Napalys Klicius
2025-03-27 12:34:39 +01:00
committed by GitHub
4 changed files with 39 additions and 1 deletions

View File

@@ -599,7 +599,7 @@ module NodeJSLib {
override DataFlow::Node getADataNode() {
if methodName.matches("%Sync")
then result = this
else
else (
exists(int i, string paramName | fsDataParam(methodName, i, paramName) |
if paramName = "callback"
then
@@ -610,6 +610,12 @@ module NodeJSLib {
)
else result = this.getArgument(i)
)
or
exists(AwaitExpr await |
this.getEnclosingExpr() = await.getOperand() and
result = DataFlow::valueNode(await)
)
)
}
}