Skip to content

Commit 7db4c42

Browse files
committed
JS: Prepare promisification and partial invocation steps for 'noopt'
1 parent f805e26 commit 7db4c42

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

javascript/ql/lib/semmle/javascript/ApiGraphs.qll

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,13 +1295,27 @@ module API {
12951295
boundArgs = 0 and
12961296
prop = ""
12971297
or
1298-
promisificationBigStep(trackUseNode(nd, false, boundArgs, prop, t.continue()), result) and
1299-
promisified = true and
1300-
prop = ""
1301-
or
1302-
exists(DataFlow::SourceNode pred, int predBoundArgs |
1303-
pred = trackUseNode(nd, promisified, predBoundArgs, prop, t.continue()) and
1304-
partialInvocationBigStep(pred, result, boundArgs - predBoundArgs)
1298+
exists(
1299+
RawSourceNode prev, boolean prevPromisified, int prevBoundArgs, string prevProp,
1300+
DataFlow::TypeTracker prevT
1301+
|
1302+
prev = trackUseNode(nd, prevPromisified, prevBoundArgs, prevProp, prevT)
1303+
|
1304+
promisificationBigStep(prev, result) and
1305+
prevPromisified = false and
1306+
prevProp = "" and
1307+
promisified = prevPromisified and
1308+
boundArgs = prevBoundArgs and
1309+
prop = prevProp and
1310+
t = prevT.continue()
1311+
or
1312+
exists(int b |
1313+
partialInvocationBigStep(prev, result, b) and
1314+
boundArgs = prevBoundArgs + b and
1315+
promisified = prevPromisified and
1316+
prop = prevProp and
1317+
t = prevT.continue()
1318+
)
13051319
)
13061320
or
13071321
exists(DataFlow::SourceNode mid |

0 commit comments

Comments
 (0)