-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make shareable HostObject code more generic (#4024)
## Summary This PR changes code that was used to handle host objects such that it applies to all kinds of host objects, not only on Fabric and not only to ShadowNodeWrapper classes. This simplifies the codebase a bit, because we get rid of a few code branches with fabric specific checks as well as allows for other types of Host Objects to be made shareable. Changes that were made cover: 1) changes in shareables c++ code where we remove fabric specific shadow wrapper shareable type and replace it with generic HostObjectType 2) changes on the JS side in shareables.ts where we detect if host object is provided and then we let it be processed by `makeShareableClone` method directly. For this purpose we add code for recognizing whether a given object is a host object or not. 3) we get rid of JS code that was preparing shadow node objects to be made "shareable" (`makeShareableShadowNodeWrapper`) in favor of the generic code added in shareables.ts described above ## Test plan Run FabricExample both on Hermes and JSC
- Loading branch information
Showing
5 changed files
with
29 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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