mirror of
https://github.com/github/codeql.git
synced 2026-05-10 01:10:09 +02:00
JavaScript: Split up a predicate to avoid bad join order.
This commit is contained in:
@@ -157,10 +157,12 @@ class InvokeNode extends DataFlow::SourceNode {
|
||||
* `name` is set to `result`.
|
||||
*/
|
||||
DataFlow::ValueNode getOptionArgument(int i, string name) {
|
||||
exists(ObjectLiteralNode obj |
|
||||
obj.flowsTo(getArgument(i)) and
|
||||
obj.hasPropertyWrite(name, result)
|
||||
)
|
||||
getOptionsArgument(i).hasPropertyWrite(name, result)
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
private ObjectLiteralNode getOptionsArgument(int i) {
|
||||
result.flowsTo(getArgument(i))
|
||||
}
|
||||
|
||||
/** Gets an abstract value representing possible callees of this call site. */
|
||||
|
||||
Reference in New Issue
Block a user