JS: rename getThisParameter to getReceiver

This commit is contained in:
Asger F
2018-12-13 10:19:44 +00:00
parent 635a3cb1ec
commit cb349348e7
4 changed files with 4 additions and 4 deletions

View File

@@ -321,13 +321,13 @@ class FunctionNode extends DataFlow::ValueNode, DataFlow::DefaultSourceNode {
}
/**
* Gets the dataflow node holding the value of the `this` argument passed to the given function.
* Gets the dataflow node holding the value of the receiver passed to the given function.
*
* Has no result for arrow functions, as they ignore the receiver argument.
*
* To get the data flow node for `this` in an arrow function, consider using `getThisBinder().getThisParameter()`.
* To get the data flow node for `this` in an arrow function, consider using `getThisBinder().getReceiver()`.
*/
ThisNode getThisParameter() {
ThisNode getReceiver() {
result.getBinder() = this
}
}

View File

@@ -1,4 +1,4 @@
import javascript
from DataFlow::FunctionNode function
select function, function.getThisParameter()
select function, function.getReceiver()