build backwards compat API for runtime pointer#43012
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D53646413 |
ef280a4 to
a6e6fb2
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53646413 |
a6e6fb2 to
f035232
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53646413 |
f035232 to
3fcaa7e
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53646413 |
Base commit: 1c4ed12 |
tsapeta
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for implementing this even though it's going to be a temporary solution!
I think you'll also need to update RCTBridgeProxy initialization in RCTInstance.mm.
There was a problem hiding this comment.
Why not jsi::Runtime * for clarity?
3fcaa7e to
0dc87bb
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53646413 |
0dc87bb to
6491d93
Compare
|
This pull request was exported from Phabricator. Differential Revision: D53646413 |
Summary: Changelog: [Android][Added] This is a pre-deprecated API to give access to the jsi::Runtime in Android in bridgeless. In bridge, this value is exposed via the ReactContext, but is not implemented in the BridgelessReactContext. We do that here. This should work out of the box in bridgeless if you are already retrieveing the pointer via ReactContext. However, we recommend users to eventually migrate towards C++ TurboModule or the RuntimeExecutor if possible. This will be removed in the future. Reviewed By: RSNara Differential Revision: D53645247
Summary: Changelog: [iOS][Added] This implements the functionality to give access to the jsi::Runtime in iOS in bridgeless. In bridge, this value is a private selector on RCTBridge that is exposed via category. We build this into the backwards compatible RCTBridgeProxy here. This should work out of the box in bridgeless if you are already retrieveing the pointer via the bridge. However, we recommend users to eventually migrate towards C++ TurboModule or the RuntimeExecutor if possible. This will be removed in the future. Reviewed By: RSNara Differential Revision: D53646413
|
This pull request was exported from Phabricator. Differential Revision: D53646413 |
6491d93 to
a866533
Compare
|
This pull request has been merged in 16276ce. |
| { | ||
| [self logWarning:@"This method is unsupported. Returning nullptr." cmd:_cmd]; | ||
| return nullptr; | ||
| [self logWarning:@"Please migrate to C++ TurboModule or RuntimeExecutor." cmd:_cmd]; |
There was a problem hiding this comment.
Are there any docs for RuntimeExecutor? How would one create a native C++ module that has access to jsi::Runtime and gets auto-linked/initialized properly on Android and iOS?
Summary:
Changelog: [iOS][Added]
This introduces the backwards-compat functionality to give access to the jsi::Runtime in iOS in bridgeless. In bridge, this value is a private selector on RCTBridge that is exposed via category. We build this into the backwards compatible RCTBridgeProxy here.
This should work out of the box in bridgeless if you are already retrieveing the pointer via the bridge. However, we recommend users to eventually migrate towards C++ TurboModule or the RuntimeExecutor if possible. This will be removed in the future.
Differential Revision: D53646413