Conversation
…`getInstallReferrerAsync` (#43419) # Why #43094 As OP mentioned, this issue is not consistently reproducible but from the stack it looks like something (`doDeath` callback) is triggering the `onInstallReferrerServiceDisconnected` on an already settled promise. <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> # How Return early if the promise was already settled. <!-- How did you build this feature or fix this bug and why? --> # Test Plan No crash repro, but existing functionality should not be affected. <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why Replace copying `Uint8Array` with zero-copy `ArrayBuffer.` # How - Replaced native argument and return types - In C++ replaced `JArrayByte` with direct `JByteBuffer` - reduces JNI overhead - Used `JavaScriptArrayBuffer` for sync and `NativeArrayBuffer` (copying but thread-safe) for async function arguments. - Kept user-facing JS types untouched - For web module, transformed back to Uint8Array # Test Plan - SQLite test suite - both Android and iOS - Manual testing of all updated functions # Checklist - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why Replace copying `Uint8Array` with native`ArrayBuffer`. # How - Replaced native argument types - Used JavaScriptArrayBuffer for sync variant - Used NativeArrayBuffer (copying but thread-safe) for async variant. - Kept user-facing JS types untouched - both `Uint8Array` and `ArrayBuffer` are supported - Updated mocks to translate back to Uint8Array and TS unit tests for the helper func # Test Plan - SQLite test suite - both Android and iOS - Manual testing - TS Unit tests # Checklist - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why Replace copying `Uint8Array` with `NativeArrayBuffer` on Android. Only one copy is done instead of two: 1. sqlite3 -> ArrayBuffer; 2. returning ArrayBuffer is now zero-copy iOS is handled later # How - Updated native code to use `ByteBuffer` / `ArrayBuffer` - Updated JS to convert back `ArrayBuffer` columns to `Uint8Array` (backwards compat) # Test Plan - Android test suite - iOS test suite - to make sure it's not broken and backward compatible # Checklist - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
# Why Follow up #42640. Replace copying `Uint8Array` with `NativeArrayBuffer`. # How - Updated native code to return `ArrayBuffer` # Test Plan - iOS test suite - Manual testing # Checklist - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )