Skip to content

Define JSI bridging function for ShadowNode::Shared #51675

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

Closed
wants to merge 1 commit into from

Conversation

rubennorte
Copy link
Contributor

Summary:
Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing shadowNodeFromValue and valueFromShadowNode functions:

  1. It's more convenient, as we can just use ShadowNode::Shared in classes implementing the codegen, and the runtime will do the conversion automatically.
  2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Differential Revision: D75597542

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 29, 2025
@facebook-github-bot
Copy link
Contributor

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:
Pull Request resolved: facebook#51675

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

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

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:
Pull Request resolved: facebook#51675

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542
@rubennorte rubennorte force-pushed the export-D75597542 branch 2 times, most recently from aa1b9dc to 3d84f81 Compare May 29, 2025 13:36
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:
Pull Request resolved: facebook#51675

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542
rubennorte added a commit to rubennorte/react-native that referenced this pull request May 29, 2025
Summary:

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

Differential Revision: D75597542
Summary:
Pull Request resolved: facebook#51675

Changelog: [internal]

This defines a new bridging method to convert ShadowNode::Shared from and to JS. This has some benefits over the existing `shadowNodeFromValue` and `valueFromShadowNode` functions:
1. It's more convenient, as we can just use `ShadowNode::Shared` in classes implementing the codegen, and the runtime will do the conversion automatically.
2. It's safer, as it checks for nullability and throws JS exceptions except of having segmentation faults down the line.

Reviewed By: javache

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

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 29, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 9c21489.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @rubennorte in 9c21489

When will my fix make it into a release? | How to file a pick request?

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.

3 participants