Skip to content

Add default implementation for Object.create(prototype)#47946

Closed
tsaichien wants to merge 2 commits into
facebook:mainfrom
tsaichien:export-D66485209
Closed

Add default implementation for Object.create(prototype)#47946
tsaichien wants to merge 2 commits into
facebook:mainfrom
tsaichien:export-D66485209

Conversation

@tsaichien
Copy link
Copy Markdown
Contributor

Summary:
Add default implementation for Object.create with custom parent. This
default implementation calls into the global object to get the
Object.create function, and then calls that function with the
prototype.

Differential Revision: D66485209

@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 Nov 26, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

…ject.setPrototypeOf (facebook#47996)

Summary:

Getting and setting an Object's prototype is convoluted. Users have to
call into the global object to get the method, then call it.

This diff adds a JSI API for Object.getPrototype and Object.setPrototype
to make it easy for users.

Changelog: [Internal]

Reviewed By: fbmal7

Differential Revision: D66562549
Summary:

Object creation with custom prototype can currently be done, but it is
unnecessarily convoluted. Users have to call into the global object to
get the `Object.create` function, then call it with the custom
prototype.

This diff adds a JSI API for Object.create(prototype) to make it easy
for users.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D66485209
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

facebook-github-bot pushed a commit to facebook/hermes that referenced this pull request Dec 12, 2024
Summary:
X-link: facebook/react-native#47946

Object creation with custom prototype can currently be done, but it is
unnecessarily convoluted. Users have to call into the global object to
get the `Object.create` function, then call it with the custom
prototype.

This diff adds a JSI API for Object.create(prototype) to make it easy
for users.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D66485209

fbshipit-source-id: 32018f847190ac16f695f011a78be0c45c4c4659
facebook-github-bot pushed a commit to facebook/hermes that referenced this pull request Dec 12, 2024
Summary:
X-link: facebook/react-native#47946

Object creation with custom prototype can currently be done, but it is
unnecessarily convoluted. Users have to call into the global object to
get the `Object.create` function, then call it with the custom
prototype.

This diff adds a JSI API for Object.create(prototype) to make it easy
for users.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D66485209

fbshipit-source-id: 32018f847190ac16f695f011a78be0c45c4c4659
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Dec 12, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in e34c1e9.

vmoroz pushed a commit to vmoroz/microsoft-hermes-windows that referenced this pull request Apr 17, 2025
Summary:
X-link: facebook/react-native#47946

Object creation with custom prototype can currently be done, but it is
unnecessarily convoluted. Users have to call into the global object to
get the `Object.create` function, then call it with the custom
prototype.

This diff adds a JSI API for Object.create(prototype) to make it easy
for users.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D66485209

fbshipit-source-id: 32018f847190ac16f695f011a78be0c45c4c4659
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