Draft
Conversation
Also introduces an abstraction around GObject to try to more appropriately capture the situation.
s1341
requested changes
Sep 12, 2024
| pub fn get_name(&self) -> &str { | ||
| let name = | ||
| unsafe { CStr::from_ptr(frida_sys::frida_device_get_name(self.device_ptr) as _) }; | ||
| let name = unsafe { CStr::from_ptr(frida_sys::frida_device_get_name(self.0.ptr()) as _) }; |
Contributor
There was a problem hiding this comment.
Should this not call the ptr() function above?
Contributor
There was a problem hiding this comment.
Same for the rest of the self.0.ptr() calls...
| pub struct DeviceManager<'a> { | ||
| #[derive(Clone)] | ||
| pub struct DeviceManager { | ||
| frida: Frida, |
Contributor
There was a problem hiding this comment.
we call this frida here, but runtime() above... Let's choose one and stick with it.
| } | ||
| } | ||
|
|
||
| static THE_ONE_TRUE_FRIDA: Mutex<Option<Arc<FridaSingleton>>> = Mutex::new(None); |
Contributor
There was a problem hiding this comment.
While this name is cute and pithy, would be better to call it FRIDA_SINGLETON, I think.
| ptr | ||
| } | ||
|
|
||
| pub(crate) fn new(ptr: *mut T, runtime: RT) -> Self { |
Contributor
There was a problem hiding this comment.
perhaps this should be called from_raw?
| unsafe { | ||
| frida_sys::frida_spawn_options_set_argv( | ||
| self.options_ptr, | ||
| self.0.ptr(), |
Contributor
|
What's happening with this? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Also introduces an abstraction around GObject to try to more appropriately capture the situation.