Skip to content

Implement Runtime.addBinding (global bindings only)#43065

Closed
motiz88 wants to merge 3 commits into
react:mainfrom
motiz88:export-D53266709
Closed

Implement Runtime.addBinding (global bindings only)#43065
motiz88 wants to merge 3 commits into
react:mainfrom
motiz88:export-D53266709

Conversation

@motiz88

@motiz88 motiz88 commented Feb 16, 2024

Copy link
Copy Markdown
Contributor

Summary:
Changelog: [Internal]

Implements support for Runtime.addBinding in the new RN CDP backend.

This implementation is mostly complete and matches Chrome's behaviour, but does not include the ability to target bindings by execution context (the optional executionContextId and executionContextName params) - that will come in a separate diff for ease of review/landing.

Incidentally, this diff also introduces the JsiIntegrationPortableTest::expectMessageFromPage helper, which allows us to "asynchronously" extract the contents of an expected message. For consistency and clarity, we refactor all the other EXPECT_CALL(this->fromPage(), onMessage(JsonEq(...))) assertions to use it as well.

Reviewed By: huntie

Differential Revision: D53266709

@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 Feb 16, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@analysis-bot

analysis-bot commented Feb 16, 2024

Copy link
Copy Markdown
Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,881,565 +53,237
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,240,029 +53,233
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 80ec096
Branch: main

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

motiz88 and others added 3 commits February 16, 2024 06:20
Differential Revision: D53759776
Differential Revision: D53776531
Summary:
Pull Request resolved: react#43065

Changelog: [Internal]

Implements support for [`Runtime.addBinding`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Runtime#method-addBinding) in the new RN CDP backend.

This implementation is mostly complete and matches Chrome's behaviour, but does not include the ability to target bindings by execution context (the optional `executionContextId` and `executionContextName` params) - that will come in a separate diff for ease of review/landing.

Incidentally, this diff also introduces the `JsiIntegrationPortableTest::expectMessageFromPage` helper, which allows us to "asynchronously" extract the contents of an expected message. For consistency and clarity, we refactor all the other `EXPECT_CALL(this->fromPage(), onMessage(JsonEq(...)))` assertions to use it as well.

Reviewed By: huntie

Differential Revision: D53266709
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 16, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in da03d7b.

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