| #
29e8b6f8 |
| 25-May-2023 |
Łukasz Kosmaty <[email protected]> |
[core][Android] Bind `JNIDeallocator` to the context (#22610)
# Why
Binds the `JNIDeallocator` to the current context.
# How
I've discovered that making `JNIDeallocator` static wasn't a go
[core][Android] Bind `JNIDeallocator` to the context (#22610)
# Why
Binds the `JNIDeallocator` to the current context.
# How
I've discovered that making `JNIDeallocator` static wasn't a good decision. This approach failed to function properly when we migrated to our API in the dev-launcher context. Whenever the user switches between the app and launcher, the app will crash since the dev-launcher remains in memory, but the app context's destruction causes all registered objects inside the `JNIDeallocator` to deallocate. Consequently, we're removing js objects associated with the dev-launcher context, even if it's still valid.
# Test Plan
- bare-expo with and without dev-client ✅
- unit tests ✅
show more ...
|
| #
5e538c67 |
| 26-Sep-2022 |
Łukasz Kosmaty <[email protected]> |
[modules][Android] Simplify unpacking of method results (#19226)
# Why
Simplifies unpacking of method results.
Before, we used a similar approach to the RN when receiving results from Kotlin fun
[modules][Android] Simplify unpacking of method results (#19226)
# Why
Simplifies unpacking of method results.
Before, we used a similar approach to the RN when receiving results from Kotlin functions in Cpp. The result was obtained as a WritableArray, and then it was unpaced. That solution isn't ideal in the long term because we always return a single value.
# How
That change for the sync function was pretty straightforward. Right now, the Kotlin function body returns an arbitrary object which is later unpaced and converted to the jsi value.
Unfortunately, to simplify the flow of async functions, I've to introduce my implementation of the callback and the promise.
# Test Plan
- tests ✅
- bare-expo and NCL ✅
show more ...
|