Skip to content

Conversation

@tsaichien
Copy link
Contributor

Summary:
After introducing the interfaces, runtime should be managed through a
shared pointer instead of a unique pointer.

This diff will change the usage in JSI testlib. Later diffs will
actually change the HermesRuntime usages.

Reviewed By: lavenzg

Differential Revision: D70113190

@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 May 2, 2025
@facebook-github-bot
Copy link
Contributor

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

tsaichien added 2 commits May 14, 2025 11:34
Summary:

Add JSI castInterface API. This provides a structured way to provide
optional APIs that may or may not be supported in all engines.

Every interface will have its own set of APIs. For instance, Hermes
will provide an interface (`IHermes`) containing Hermes-specific
APIs. In the future, an interface may be created to expose optional
APIs.

A runtime will inherit the interfaces of which the APIs are supported by
the runtime. Users who want to access a specific API may call
castInterface with the UUID of interface containing the API.

For backwards compatibility, the current `jsi::Runtime` will remain as
an object, and its functionalities will not be described by an
interface. However, this may be revisited later.

Changelog: [Internal]

Reviewed By: tmikov

Differential Revision: D68964360
Summary:

After introducing the interfaces, runtime should be managed through a
shared pointer instead of a unique pointer.

This diff will change the usage in JSI testlib. Later diffs will
actually change the HermesRuntime usages.

Reviewed By: lavenzg

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

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

facebook-github-bot pushed a commit to facebook/hermes that referenced this pull request May 14, 2025
Summary:
X-link: facebook/react-native#51081

After introducing the interfaces, runtime should be managed through a
shared pointer instead of a unique pointer.

This diff will change the usage in JSI testlib. Later diffs will
actually change the HermesRuntime usages.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D70113190

fbshipit-source-id: ea831dd8f79750851fd626afe0f1f5550142ac05
facebook-github-bot pushed a commit to facebook/hermes that referenced this pull request May 14, 2025
Summary:
X-link: facebook/react-native#51081

After introducing the interfaces, runtime should be managed through a
shared pointer instead of a unique pointer.

This diff will change the usage in JSI testlib. Later diffs will
actually change the HermesRuntime usages.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D70113190

fbshipit-source-id: ea831dd8f79750851fd626afe0f1f5550142ac05
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 14, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 6766cf6.

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.

2 participants