mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Promote event loop control JSI interface out of UNSTABLE (#57005)
Summary: X-link: https://github.com/facebook/hermes/pull/2037 Pull Request resolved: https://github.com/facebook/react-native/pull/57005 Promote `IEventLoopControl` and `ISetEventLoopControl` out of `JSI_UNSTABLE` and make `HermesRuntimeImpl` always implement the setter interface. Keep unrelated unstable APIs such as serialization, tracing helpers, and Worker installation behind `JSI_UNSTABLE`. Other hermes branches do not implement `ISetEventLoopControl`, for now. Changelog: [Internal] Reviewed By: tmikov Differential Revision: D106744174 fbshipit-source-id: 0cf88de7c067f091b19238fce7171300b9777c98
This commit is contained in:
1 parent
b96b626297
commit
bd250e63e1
10 files changed
+126
-2
No files matched your search
@@ -26,7 +26,6 @@ namespace debugger {
|
||||
class Debugger;
|
||||
}
|
||||
|
||||
#ifdef JSI_UNSTABLE
|
||||
/// IEventLoopControl is defined by the integrator to allow the Runtime to
|
||||
/// schedule some task to be run when convenient, and to keep track of "Task
|
||||
/// sources". After it is set to a Runtime, the integrator must ensure that the
|
||||
@@ -79,7 +78,6 @@ struct JSI_EXPORT ISetEventLoopControl : public jsi::ICast {
|
||||
protected:
|
||||
~ISetEventLoopControl() = default;
|
||||
};
|
||||
#endif
|
||||
|
||||
/// Interface for Hermes-specific runtime methods.The actual implementations of
|
||||
/// the pure virtual methods are provided by Hermes API.
|
||||
|
||||
@@ -438,6 +438,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AndroidHorizontalScrollContentViewShadowNodeComponentName[];
|
||||
const char facebook::react::AndroidProgressBarComponentName[];
|
||||
|
||||
@@ -438,6 +438,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AndroidHorizontalScrollContentViewShadowNodeComponentName[];
|
||||
const char facebook::react::AndroidProgressBarComponentName[];
|
||||
|
||||
@@ -438,6 +438,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AndroidHorizontalScrollContentViewShadowNodeComponentName[];
|
||||
const char facebook::react::AndroidProgressBarComponentName[];
|
||||
|
||||
@@ -3380,6 +3380,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AppleSwitchComponentName[];
|
||||
const char facebook::react::ImageComponentName[];
|
||||
|
||||
@@ -3367,6 +3367,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AppleSwitchComponentName[];
|
||||
const char facebook::react::ImageComponentName[];
|
||||
|
||||
@@ -3380,6 +3380,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AppleSwitchComponentName[];
|
||||
const char facebook::react::ImageComponentName[];
|
||||
|
||||
@@ -136,6 +136,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AndroidProgressBarComponentName[];
|
||||
const char facebook::react::AndroidSwitchComponentName[];
|
||||
|
||||
@@ -136,6 +136,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AndroidProgressBarComponentName[];
|
||||
const char facebook::react::AndroidSwitchComponentName[];
|
||||
|
||||
@@ -136,6 +136,20 @@ class facebook::hermes::IHermesSHUnit : public facebook::jsi::ICast {
|
||||
public virtual SHUnitCreator getSHUnitCreator() const = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::IEventLoopControl {
|
||||
protected ~IEventLoopControl() = default;
|
||||
public virtual uint64_t registerTaskQueueSource() = 0;
|
||||
public virtual void scheduleTask(const std::function<void()>& task) = 0;
|
||||
public virtual void unregisterTaskQueueSource(uint64_t sourceId) = 0;
|
||||
}
|
||||
|
||||
struct facebook::hermes::ISetEventLoopControl : public facebook::jsi::ICast {
|
||||
protected ~ISetEventLoopControl() = default;
|
||||
public static constexpr facebook::jsi::UUID uuid;
|
||||
public virtual facebook::hermes::IEventLoopControl* getEventLoopControl() = 0;
|
||||
public virtual void setEventLoopControl(facebook::hermes::IEventLoopControl* eventLoopControl) = 0;
|
||||
}
|
||||
|
||||
|
||||
const char facebook::react::AndroidProgressBarComponentName[];
|
||||
const char facebook::react::AndroidSwitchComponentName[];
|
||||
|
||||
Reference in new issue
Block a user