History log of /expo/packages/expo-modules-core/android/src/main/cpp/JavaScriptFunction.h (Results 1 – 2 of 2)
Revision Date Author Comments
# 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 ...


# 879827bb 06-Apr-2023 Łukasz Kosmaty <[email protected]>

[core][Android] Add functions converter (#21976)

# Why

Adds functions converter.

# How

- Adds a frontend and backend converter for js function type
- Adds ability to call those functions

[core][Android] Add functions converter (#21976)

# Why

Adds functions converter.

# How

- Adds a frontend and backend converter for js function type
- Adds ability to call those functions via Kotlin code

# Test Plan

- unit tests ✅

show more ...