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

Rollout useNativeState #40864

Closed
wants to merge 1 commit into from
Closed

Conversation

javache
Copy link
Member

@javache javache commented Oct 12, 2023

Summary: Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: sammy-SC

Differential Revision: D50176083

@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. p: Facebook Partner: Facebook Partner labels Oct 12, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

@analysis-bot
Copy link

analysis-bot commented Oct 12, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,149,072 -4,094
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 20,521,840 -4,087
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: bbc517c
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 13, 2023
Summary:
Pull Request resolved: facebook#40864

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083

fbshipit-source-id: 969a7184a9b6b7a656017d0245be5830cdf16391
javache added a commit to javache/react-native that referenced this pull request Oct 13, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 13, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 13, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 13, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 16, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 16, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 16, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 16, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

javache added a commit to javache/react-native that referenced this pull request Oct 16, 2023
Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

Summary:

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D50176083

@github-actions
Copy link

github-actions bot commented Oct 16, 2023

Warnings
⚠️ One hour and a half have passed and the E2E jobs haven't finished yet.

Generated by 🚫 dangerJS against 192214f

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 16, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f308f02.

@javache javache deleted the export-D50176083 branch October 17, 2023 09:57
Othinn pushed a commit to Othinn/react-native that referenced this pull request Oct 30, 2023
Summary:
Pull Request resolved: facebook#40864

Changelog: [Internal] Use JSI's NativeState abstraction to reference C++ objects across JS calls

Reviewed By: rubennorte, sammy-SC

Differential Revision: D50176083

fbshipit-source-id: 43db3dd7af4ce666a648100cb8cd000d964630b1
@WoLewicki
Copy link
Contributor

@javache why was ShadowNodeWrapper deleted here?

facebook-github-bot pushed a commit that referenced this pull request Jul 4, 2024
…gain (#45290)

Summary:
This PR restores the virtual destructor for `ShadowNodeWrapper` which was added in #33500 and unfortunately removed in #40864.

The virtual destructor here serves as a key function. Without a key function, `obj.hasNativeState<ShadowNodeWrapper>(rt)` **does not** work correctly between shared library boundaries on Android and always returns false.

We need this pretty badly in third-party libraries like react-native-reanimated or react-native-gesture-handler.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ANDROID] [FIXED] - Fix dynamic_cast (RTTI) for ShadowNodeWrapper when accessed by third-party libraries again

Pull Request resolved: #45290

Test Plan: This patch fixes an issue in Reanimated's fabric-example app.

Reviewed By: fabriziocucci

Differential Revision: D59375554

Pulled By: javache

fbshipit-source-id: 09f3eda89a67c26d6dacca3428e08d1b7138d350
cipolleschi pushed a commit that referenced this pull request Jul 8, 2024
…gain (#45290)

Summary:
This PR restores the virtual destructor for `ShadowNodeWrapper` which was added in #33500 and unfortunately removed in #40864.

The virtual destructor here serves as a key function. Without a key function, `obj.hasNativeState<ShadowNodeWrapper>(rt)` **does not** work correctly between shared library boundaries on Android and always returns false.

We need this pretty badly in third-party libraries like react-native-reanimated or react-native-gesture-handler.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ANDROID] [FIXED] - Fix dynamic_cast (RTTI) for ShadowNodeWrapper when accessed by third-party libraries again

Pull Request resolved: #45290

Test Plan: This patch fixes an issue in Reanimated's fabric-example app.

Reviewed By: fabriziocucci

Differential Revision: D59375554

Pulled By: javache

fbshipit-source-id: 09f3eda89a67c26d6dacca3428e08d1b7138d350
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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants