JS: Remove duplicate PromiseFlowStep

This commit is contained in:
Asger F
2019-01-17 12:56:40 +00:00
parent 66901dc7b8
commit fc27b26bd5
2 changed files with 1 additions and 18 deletions

View File

@@ -4,23 +4,6 @@
import javascript
/**
* A data flow edge from a promise reaction to the corresponding handler.
*/
private class PromiseFlowStep extends DataFlow::AdditionalFlowStep {
PromiseDefinition p;
PromiseFlowStep() { this = p }
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
pred = p.getResolveParameter().getACall().getArgument(0) and
succ = p.getAResolveHandler().getParameter(0)
or
pred = p.getRejectParameter().getACall().getArgument(0) and
succ = p.getARejectHandler().getParameter(0)
}
}
/**
* Holds if taint propagates from `pred` to `succ` through promises.
*/

View File

@@ -142,7 +142,7 @@ private class ES2015PromiseDefinition extends PromiseDefinition, DataFlow::NewNo
/**
* A data flow edge from a promise reaction to the corresponding handler.
*/
private class PromiseFlowStep extends DataFlow::AdditionalFlowStep {
private class PromiseFlowStep extends DataFlow::AdditionalFlowStep {
PromiseDefinition p;
PromiseFlowStep() { this = p }