-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[Hermes] Bump Hermes #45220
[Hermes] Bump Hermes #45220
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,9 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation { | |
const std::shared_ptr<const PreparedJavaScript>& js) override { | ||
return plain().evaluatePreparedJavaScript(js); | ||
} | ||
void queueMicrotask(const jsi::Function& callback) override { | ||
return plain().queueMicrotask(callback); | ||
} | ||
bool drainMicrotasks(int maxMicrotasksHint) override { | ||
return plain().drainMicrotasks(maxMicrotasksHint); | ||
} | ||
|
@@ -544,6 +547,10 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> { | |
Around around{with_}; | ||
return RD::evaluatePreparedJavaScript(js); | ||
} | ||
void queueMicrotask(const Function& callback) override { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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_}; | ||
RD::queueMicrotask(callback); | ||
} | ||
bool drainMicrotasks(int maxMicrotasksHint) override { | ||
Around around{with_}; | ||
return RD::drainMicrotasks(maxMicrotasksHint); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,6 +209,13 @@ class JSI_EXPORT Runtime { | |
virtual Value evaluatePreparedJavaScript( | ||
const std::shared_ptr<const PreparedJavaScript>& js) = 0; | ||
|
||
/// Queues a microtask in the JavaScript VM internal Microtask (a.k.a. Job in | ||
/// ECMA262) queue, to be executed when the host drains microtasks in | ||
/// its event loop implementation. | ||
/// | ||
/// \param callback a function to be executed as a microtask. | ||
virtual void queueMicrotask(const jsi::Function& callback) = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
/// Drain the JavaScript VM internal Microtask (a.k.a. Job in ECMA262) queue. | ||
/// | ||
/// \param maxMicrotasksHint a hint to tell an implementation that it should | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
hermes-2024-06-03-RNv0.74.2-bb1e74fe1e95c2b5a2f4f9311152da052badc2bc | ||
hermes-2024-06-28-RNv0.74.3-7bda0c267e76d11b68a585f84cfdd65000babf85 |
There was a problem hiding this comment.
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