-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Pass jsi::Runtime reference into CallInvoker::invoke* callbacks #43375
Conversation
This pull request was exported from Phabricator. Differential Revision: D54643171 |
…book#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
This pull request was exported from Phabricator. Differential Revision: D54643171 |
…acks (facebook#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
This pull request was exported from Phabricator. Differential Revision: D54643171 |
…book#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
This pull request was exported from Phabricator. Differential Revision: D54643171 |
…acks (facebook#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
…book#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
…book#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
This pull request was exported from Phabricator. Differential Revision: D54643171 |
…book#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
This pull request was exported from Phabricator. Differential Revision: D54643171 |
…book#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
This pull request was exported from Phabricator. Differential Revision: D54643171 |
…book#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
…book#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
This pull request was exported from Phabricator. Differential Revision: D54643171 |
…acks (facebook#43375) Summary: ## Changelog: [Internal] - As discussed with the team, it makes more sense to pass the reference to the correct `jsi::Runtime` object as an argument to the ` CallInvoker::invoke*` callbacks, that are provided by the user. There are various use cases when user would like to get a hold of the `jsi::Runtime` in the callback, and it makes sense, since it is guaranteed to run on the JS thread. So far people have been coming up with all kinds of workarounds for that, none of them safe enough. Reviewed By: rubennorte Differential Revision: D54643171
This pull request has been merged in 76ce789. |
Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Differential Revision: D56807994
Summary: Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Differential Revision: D56866817
…44378) Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
…44378) Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
Summary: Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817
Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
…44378) Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
…44378) Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
Summary: Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817
…44378) Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
Summary: Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817
…44378) Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
…44378) Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
Summary: Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994
Summary: Pull Request resolved: #44378 Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after #43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994 fbshipit-source-id: 5c3585356d016a50645eda3af2d3bbe00298b4e4
Summary: Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817
Summary: Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817
Summary: Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817
Summary: Pull Request resolved: #44381 Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after #43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817 fbshipit-source-id: 4096847c52559d9a49feb072a0385da6b64392d4
Summary: Pull Request resolved: facebook#44378 Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994 fbshipit-source-id: 5c3585356d016a50645eda3af2d3bbe00298b4e4
Summary: Pull Request resolved: facebook#44381 Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817 fbshipit-source-id: 4096847c52559d9a49feb072a0385da6b64392d4
Summary: Pull Request resolved: facebook#44378 Changelog: [iOS][Added] introduce CallInvoker support in bridgeless native modules I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. Reviewed By: RSNara Differential Revision: D56807994 fbshipit-source-id: 5c3585356d016a50645eda3af2d3bbe00298b4e4
Summary: Pull Request resolved: facebook#44381 Changelog: [Android][Added] I am adding this API in favor of RCTRuntimeExecutor. CallInvoker is now preferred because after facebook#43375, the CallInvoker has access to the jsi::Runtime. Since the community is using CallInvoker already for their async access use cases, CallInvoker is the preferred choice of RuntimeExecutor / RuntimeScheduler because of easier migration. Also, having a wrapper like CallInvoker will give us more flexibility in the future if we want to expand this API. this will be forward compatible in the old architecture Reviewed By: RSNara Differential Revision: D56866817 fbshipit-source-id: 4096847c52559d9a49feb072a0385da6b64392d4
@rshest I see that care was made in this PR to provide signatures for backward compatibility, but these were only added for overload that doesn't take a SchedulerPriority as first argument. We depend on the overload that does take a react-native/packages/react-native/ReactCommon/callinvoker/ReactCommon/CallInvoker.h Lines 30 to 36 in 387560a
This caused realm-js#6845 and realm-js#6846. I wanted to flag this here first, in case you want to do a quick follow-up PR. I can also create an issue to track this separately. |
Summary:
Changelog:
[Internal] -
As discussed with the team, it makes more sense to pass the reference to the correct
jsi::Runtime
object as an argument to theCallInvoker::invoke*
callbacks, that are provided by the user.There are various use cases when user would like to get a hold of the
jsi::Runtime
in the callback, and it makes sense, since it is guaranteed to run on the JS thread.So far people have been coming up with all kinds of workarounds for that, none of them safe enough.
Differential Revision: D54643171