mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use getter instead of directly accessing ivar
Summary: Changelog: [internal] Use getter function instead of accessing ivar. This makes for clearer APIs. React part is implemented in https://github.com/facebook/react/pull/21553 Reviewed By: JoshuaGross Differential Revision: D28675372 fbshipit-source-id: cf99f8482067bfc0fd57d39fda9656abd665bb69
This commit is contained in:
committed by
Facebook GitHub Bot
parent
917f83c940
commit
fa899cb51f
@@ -777,8 +777,18 @@ jsi::Value UIManagerBinding::get(
|
||||
});
|
||||
}
|
||||
|
||||
if (methodName == "unstable_currentEventPriority") {
|
||||
return jsi::Value(serialize(currentEventPriority_));
|
||||
if (methodName == "unstable_getCurrentEventPriority") {
|
||||
return jsi::Function::createFromHostFunction(
|
||||
runtime,
|
||||
name,
|
||||
0,
|
||||
[this](
|
||||
jsi::Runtime &,
|
||||
jsi::Value const &,
|
||||
jsi::Value const *,
|
||||
size_t) noexcept -> jsi::Value {
|
||||
return jsi::Value(serialize(currentEventPriority_));
|
||||
});
|
||||
}
|
||||
|
||||
if (methodName == "unstable_DefaultEventPriority") {
|
||||
|
||||
Reference in New Issue
Block a user