react-native
react-native copied to clipboard
[Android] Update bridge to handle long values
Summary:
This adds support for 64 bit integer (long) values to the Android bridge. Per the wide gamut color RFC Android encodes wide gamut colors as long values so we need to update the bridge to support 64 bit integers as well since these classes will soon receive those values from native.
Changelog:
[ANDROID] [ADDED] - Update bridge to handle long values
Test Plan:
I added tests where I could for long types and truncation. I would like to add tests for ReadableNativeArray and ReadableNativeMap but I'm not sure how to go about mocking HybridData.
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 17,935,065 | -65,631 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 21,293,281 | -65,786 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: 6549216b765b850a5751075ce270fcb78e76b778 Branch: main
LGTM
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@NickGerleman merged this pull request in facebook/react-native@0dc5c5f1f43701f396d2eb49bbabd2bfd2338cf4.