Skip to content

Commit 94cf3a8

Browse files
committed
correct copy-paste note after refactorings
1 parent 8f06e96 commit 94cf3a8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

javascript/ql/src/semmle/javascript/Promises.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,6 @@ private module AsyncReturnSteps {
469469
* A data-flow step for ordinary and exceptional returns from async functions.
470470
*/
471471
private class AsyncReturn extends PreCallGraphStep {
472-
// Note: partially copy-paste from FlowSteps::CachedSteps::returnStep/2
473472
override predicate storeStep(DataFlow::Node pred, DataFlow::SourceNode succ, string prop) {
474473
exists(DataFlow::FunctionNode f | f.getFunction().isAsync() |
475474
// ordinary return
@@ -478,6 +477,7 @@ private module AsyncReturnSteps {
478477
succ = f.getReturnNode()
479478
or
480479
// exceptional return
480+
// Note: partially copy-paste from FlowSteps::localExceptionStep/2
481481
prop = errorProp() and
482482
exists(Expr expr |
483483
expr = any(ThrowStmt throw).getExpr() and

javascript/ql/src/semmle/javascript/dataflow/internal/FlowSteps.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ predicate localFlowStep(
6161
* Holds if an exception thrown from `pred` can propagate locally to `succ`.
6262
*/
6363
predicate localExceptionStep(DataFlow::Node pred, DataFlow::Node succ) {
64+
// Note: FlowSteps::localExceptionStep/2 has copy-paste children
6465
exists(Expr expr |
6566
expr = any(ThrowStmt throw).getExpr() and
6667
pred = expr.flow()
@@ -220,7 +221,6 @@ private module CachedSteps {
220221
*/
221222
cached
222223
predicate returnStep(DataFlow::Node pred, DataFlow::Node succ) {
223-
// Note: FlowSteps::CachedSteps::returnStep/2 has copy-paste children
224224
exists(Function f | calls(succ, f) or callsBound(succ, f, _) |
225225
DataFlow::functionReturnNode(pred, f)
226226
or

0 commit comments

Comments
 (0)