Skip to content

Commit

Permalink
Add implementation for requestPaint
Browse files Browse the repository at this point in the history
Summary:
Changelog: [internal]

requestPaint is unimplemented on JavaScript scheduler:

https://github.com/facebook/react/blob/master/packages/scheduler/src/forks/SchedulerNoDOM.js#L445

Reviewed By: mdvacca

Differential Revision: D27651947

fbshipit-source-id: 1e3cece8cbcd330f2408887ceb283ca61374f5bd
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Apr 14, 2021
1 parent cc3e87c commit 52f1d54
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,21 @@ jsi::Value RuntimeSchedulerBinding::get(
return jsi::Value(shouldYield);
});
}

if (propertyName == "unstable_requestPaint") {
return jsi::Function::createFromHostFunction(
runtime,
name,
0,
[](jsi::Runtime &,
jsi::Value const &,
jsi::Value const *,
size_t) noexcept -> jsi::Value {
// RequestPaint is left empty by design.
return jsi::Value::undefined();
});
}

if (propertyName == "unstable_ImmediatePriority") {
return jsi::Value(runtime, serialize(SchedulerPriority::ImmediatePriority));
}
Expand Down

0 comments on commit 52f1d54

Please sign in to comment.