react-native
react-native copied to clipboard
introduce native api to access RuntimeExecutor
Summary: Changelog: [Android][Added] - introduce native api to access RuntimeExecutor
This is the android equivalent of PR#42758.
From PR#42758
The goal of this API is to provide a safe way to access the jsi::runtime in bridgeless mode. The decision to limit access to the runtime in bridgeless was a conscious one - the runtime pointer is not thread-safe and its lifecycle must be managed correctly by owners.
However, interacting with the runtime is an advanced use case we would want to support. Our recommended ways to access the runtime in bridgeless mode is either 1) via the RuntimeExecutor, or 2) via a C++ TurboModule.
This diff introduces the API that would allow for 1). because react context can be non-null before react instance is ready, i created an async api that will guarantee the runtime executor will be ready.
Differential Revision: D53461821
This pull request was exported from Phabricator. Differential Revision: D53461821
This pull request was exported from Phabricator. Differential Revision: D53461821
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 17,233,692 | -7 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 20,600,119 | -1 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: e37da1e71a039768202ab4888463fb3b3eca8352 Branch: main
This pull request was exported from Phabricator. Differential Revision: D53461821
This pull request was exported from Phabricator. Differential Revision: D53461821
This pull request was exported from Phabricator. Differential Revision: D53461821
This pull request was exported from Phabricator. Differential Revision: D53461821
This pull request has been merged in facebook/react-native@d7dce975f91255c6383f9cc6d3b8f818f6e0420b.