Skip to content

Commit ecf7ed3

Browse files
committed
JS: Performance tweak
1 parent 67cef92 commit ecf7ed3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

javascript/ql/lib/semmle/javascript/dataflow/TaintTracking.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,13 @@ module TaintTracking {
714714
/**
715715
* Gets a local source of any part of the input to the given stringification `call`.
716716
*/
717+
pragma[nomagic]
717718
private DataFlow::Node getAJsonLocalInput(JsonStringifyCall call) {
718719
result = call.getInput()
719720
or
720-
exists(DataFlow::SourceNode source | source = getAJsonLocalInput(call).getALocalSource() |
721+
exists(DataFlow::SourceNode source |
722+
source = pragma[only_bind_out](getAJsonLocalInput(call)).getALocalSource()
723+
|
721724
result = source.getAPropertyWrite().getRhs()
722725
or
723726
result = source.(DataFlow::ObjectLiteralNode).getASpreadProperty()

0 commit comments

Comments
 (0)