mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
JS: rename getThisParameter to getReceiver
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from DataFlow::FunctionNode function
|
||||
select function, function.getThisParameter()
|
||||
select function, function.getReceiver()
|
||||
Reference in New Issue
Block a user