-
Notifications
You must be signed in to change notification settings - Fork 5.3k
mobile: check for pending exceptions after JNI call #24361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
cbc1bfc
checking for exceptions
Augustyniak d74110c
checking for exceptions
Augustyniak 0ef0bd8
add test
Augustyniak 7f4f302
improve tests
Augustyniak 7e45442
rename
Augustyniak def2550
Lint fixes
Augustyniak b0730d0
potential fix
Augustyniak 7670d9d
change level
Augustyniak e196512
“:hammer:”
Augustyniak 4f5137c
attempt
Augustyniak 00ba364
disable
Augustyniak 125460c
disable
Augustyniak 3ad5ae0
remove logging as it was locking
Augustyniak ff3266d
remove
Augustyniak 57727d3
fix pre-format
Augustyniak 7ee1e64
Revert "remove"
Augustyniak f566610
remove expectedMessages
Augustyniak 9521741
cr
Augustyniak bda8425
lint fix
Augustyniak b99b523
rename pass_headers
Augustyniak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,32 @@ | ||
| #pragma once | ||
|
|
||
| #include "library/common/types/c_types.h" | ||
|
|
||
| namespace Envoy { | ||
| namespace Types { | ||
|
|
||
| /** | ||
| * A wrapper around envoy_headers that's responsible for freeing | ||
| * the underlying headers when they are not needed anymore. | ||
| */ | ||
| class ManagedEnvoyHeaders { | ||
| public: | ||
| /** | ||
| * Initialize a new instance of the receiver using a given instance of envoy headers. | ||
| * | ||
| * @param headers, that should be wrapped by the receiver. The wrapper will hold onto | ||
| * the passed headers and free them once the receiver is not used anymore. | ||
| */ | ||
| ManagedEnvoyHeaders(envoy_headers headers) : headers_(headers){}; | ||
| ~ManagedEnvoyHeaders() { release_envoy_headers(headers_); } | ||
| const envoy_headers& get() const { return headers_; } | ||
|
|
||
| private: | ||
| envoy_headers headers_; | ||
| // Make copy and assignment operators private to prevent copying of the receiver. | ||
| ManagedEnvoyHeaders(const ManagedEnvoyHeaders&); | ||
| ManagedEnvoyHeaders& operator=(const ManagedEnvoyHeaders&); | ||
| }; | ||
|
|
||
| } // namespace Types | ||
| } // namespace Envoy |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one isn't called by jvm directly either. optional nit onHeadersFromJvm or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's calling a method from the java world tho which I think is why it has a
jvmprefix (pass_headers - now renamed topassHeaders- method did not havejvmprefix as it was/is not calling intojvm`).I do not have a strong opinion in here but will keep the things they are until we figure out new naming patterns for this file - ideally in a separate PR.