Skip to content

Commit cb34934

Browse files
committed
JS: rename getThisParameter to getReceiver
1 parent 635a3cb commit cb34934

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

javascript/ql/src/semmle/javascript/dataflow/Nodes.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,13 @@ class FunctionNode extends DataFlow::ValueNode, DataFlow::DefaultSourceNode {
321321
}
322322

323323
/**
324-
* Gets the dataflow node holding the value of the `this` argument passed to the given function.
324+
* Gets the dataflow node holding the value of the receiver passed to the given function.
325325
*
326326
* Has no result for arrow functions, as they ignore the receiver argument.
327327
*
328-
* To get the data flow node for `this` in an arrow function, consider using `getThisBinder().getThisParameter()`.
328+
* To get the data flow node for `this` in an arrow function, consider using `getThisBinder().getReceiver()`.
329329
*/
330-
ThisNode getThisParameter() {
330+
ThisNode getReceiver() {
331331
result.getBinder() = this
332332
}
333333
}

javascript/ql/test/library-tests/ThisParameter/GetThis.expected renamed to javascript/ql/test/library-tests/Receiver/GetReceiver.expected

File renamed without changes.

javascript/ql/test/library-tests/ThisParameter/GetThis.ql renamed to javascript/ql/test/library-tests/Receiver/GetReceiver.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import javascript
22

33
from DataFlow::FunctionNode function
4-
select function, function.getThisParameter()
4+
select function, function.getReceiver()
File renamed without changes.

0 commit comments

Comments
 (0)