forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script: track this pointer capture from blocks within lambdas (elasti…
…c#82228) * Script: track this pointer capture from blocks within lambdas If a lambda contains a block that calls into a user function, the painless compiler was not tracking that the lambda needs to capture the `this` pointer. Scripts that attempted to use a lambda that calls a user function from inside a block would trigger an `illegal_state_exception`: > no 'this' pointer within static method `BlockScope` now forwards `setUsesInstanceMethod` calls to it's parent, which may be a `LambdaScope`. `LambdaScope` will also forward `setUsesInstanceMethod` to it's parent after setting it's own `usesInstanceMethod` flag, propagating `this` pointer capture in the case of nested lambdas. Fixes: elastic#82224
- Loading branch information
1 parent
0854d44
commit 896e968
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 82228 | ||
summary: "Script: track this pointer capture from blocks within lambdas" | ||
area: Infra/Scripting | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters