Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing constructor to WritableNativeArray #32796

Conversation

piaskowyk
Copy link
Contributor

@piaskowyk piaskowyk commented Dec 22, 2021

Summary

WritableNativeMap has two constructors:

WritableNativeMap();
WritableNativeMap(folly::dynamic &&val);

but WritableNativeArray has only one constructor:

WritableNativeArray();

Without a second constructor, I am not able to create WritableNativeArray from the existing array. I added this second constructor because I need it for react-native-reanimated.

Changelog

[Android] [Added] - Added missing constructor to WritableNativeArray

Test Plan

std::shared_ptr<jsi::Runtime> rt = facebook::hermes::makeHermesRuntime();
jsi::Value value;
WritableNativeArray::newObjectCxxArgs(jsi::dynamicFromValue(*rt.get(), value));

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Dec 22, 2021
@react-native-bot react-native-bot added Platform: Android Android applications. Type: Enhancement A new feature or enhancement of an existing feature. labels Dec 22, 2021
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 5763133
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,286,732 +873
android hermes armeabi-v7a 7,621,079 +764
android hermes x86 8,758,424 +1,476
android hermes x86_64 8,696,012 +1,604
android jsc arm64-v8a 9,675,099 +864
android jsc armeabi-v7a 8,666,150 +772
android jsc x86 9,632,300 +1,483
android jsc x86_64 10,227,490 +1,605

Base commit: 5763133
Branch: main

@facebook-github-bot
Copy link
Contributor

@lunaleaps has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @piaskowyk in c68c47d.

When will my fix make it into a release? | Upcoming Releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants