Skip to content

[Hermes] Bump Hermes - #45220

Merged
Titozzz merged 2 commits into
0.74-stablefrom
cipolleschi/bump-hermes
Jul 1, 2024
Merged

[Hermes] Bump Hermes#45220
Titozzz merged 2 commits into
0.74-stablefrom
cipolleschi/bump-hermes

Conversation

@cipolleschi

@cipolleschicipolleschi commented Jun 28, 2024

Copy link
Copy Markdown
Contributor

Summary:

This PR bumps hermes in 0.74. This is needed because we need the microTask queue that has been shipped in Hermes

Changelog:

[Internal] - Bump Hermes

Test Plan:

CCI is green again for build_android

@facebook-github-botfacebook-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 Jun 28, 2024
@cipolleschi
cipolleschi changed the base branch from main to 0.74-stableJune 28, 2024 13:49
@cipolleschi
cipolleschiforce-pushed the cipolleschi/bump-hermes branch from b2e22b4 to d818083CompareJune 28, 2024 14:10
Comment on lines +129 to +131
void queueMicrotask(const jsi::Function& callback) override {
return plain().queueMicrotask(callback);
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facebook/hermes@0a632b7 adds this change in JSI. We need it in React Native as well

Around around{with_};
return RD::evaluatePreparedJavaScript(js);
}
void queueMicrotask(const Function& callback) override {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facebook/hermes@0a632b7 adds this change in JSI. We need it in React Native as well

/// its event loop implementation.
///
/// \param callback a function to be executed as a microtask.
virtual void queueMicrotask(const jsi::Function& callback) = 0;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facebook/hermes@7bda0c2 adds this change in JSI. We need it in React Native as well

@cipolleschi
cipolleschi marked this pull request as ready for review June 28, 2024 14:12
Summary:
Changelog: [internal]
## Context
We want to enable the new React Native event loop by default for all users on the new RN architecture (on the bridgeless initialization path more concretely), which requires support for microtasks in all the JS engines that the support (Hermes already has it, JSC doesn't).
## Changes
This adds initial support for microtasks in JSC, so we can schedule and execute microtasks in this runtime.
One limitation about this approach is that, AFAIK, the public API for JSC doesn't allow us to customize its internal microtask queue or specify the method to be used by its built-in `Promise` or native `async function`, so we're forced to continue using a polyfill in that case (which uses `setImmediate` that will be mapped to `queueMicrotask`).
Reviewed By: NickGerleman
Differential Revision: D54302534
fbshipit-source-id: 47f71620344a81bc6624917f77452106ffbf55a3
@analysis-bot

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a17,857,519-2,459,486
androidhermesarmeabi-v7an/a--
androidhermesx86n/a--
androidhermesx86_64n/a--
androidjscarm64-v8a21,211,588-2,302,058
androidjscarmeabi-v7an/a--
androidjscx86n/a--
androidjscx86_64n/a--

Base commit: 9833338
Branch: main

@Titozzz
Titozzz merged commit 3a1ff94 into 0.74-stableJul 1, 2024
@cipolleschicipolleschi mentioned this pull request Jul 22, 2024
@cortinico
cortinico deleted the cipolleschi/bump-hermes branch November 4, 2024 17:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.p: FacebookPartner: FacebookPartnerPick Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React Native 0.74.0-rc.4: use_ccache is broken: no ccache wrapper script ccache-clang.sh bundled in npm package

5 participants

@cipolleschi@analysis-bot@Titozzz@facebook-github-bot@rubennorte