Skip to content

Commit

Permalink
delete shouldYield from commit options (#47191)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #47191

changelog: [internal]

not used, let's delete it.

Reviewed By: javache, rubennorte

Differential Revision: D64916432

fbshipit-source-id: 182848c85ca58d4e8fae3c6ab67c781807803dff
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Oct 26, 2024
1 parent a88ddce commit db09e7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ CommitStatus ShadowTree::tryCommit(
const auto& oldRootShadowNode = oldRevision.rootShadowNode;
auto newRootShadowNode = transaction(*oldRevision.rootShadowNode);

if (!newRootShadowNode ||
(commitOptions.shouldYield && commitOptions.shouldYield())) {
if (!newRootShadowNode) {
return CommitStatus::Cancelled;
}

Expand All @@ -297,8 +296,7 @@ CommitStatus ShadowTree::tryCommit(
newRootShadowNode = delegate_.shadowTreeWillCommit(
*this, oldRootShadowNode, newRootShadowNode);

if (!newRootShadowNode ||
(commitOptions.shouldYield && commitOptions.shouldYield())) {
if (!newRootShadowNode) {
return CommitStatus::Cancelled;
}

Expand All @@ -316,10 +314,6 @@ CommitStatus ShadowTree::tryCommit(
// Updating `currentRevision_` in unique manner if it hasn't changed.
std::unique_lock lock(commitMutex_);

if (commitOptions.shouldYield && commitOptions.shouldYield()) {
return CommitStatus::Cancelled;
}

if (ReactNativeFeatureFlags::
enableGranularShadowTreeStateReconciliation()) {
auto lastRevisionNumberWithNewStateChanged =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ class ShadowTree final {
// will then let React run layout effects and apply updates before paint.
// For all other commits, should be true.
bool mountSynchronously{true};

// Called during `tryCommit` phase. Returning true indicates current commit
// should yield to the next commit.
std::function<bool()> shouldYield;
};

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,7 @@ jsi::Value UIManagerBinding::get(
uiManager->completeSurface(
surfaceId,
shadowNodeList,
{.enableStateReconciliation = true,
.mountSynchronously = false,
.shouldYield = nullptr});
{.enableStateReconciliation = true, .mountSynchronously = false});

return jsi::Value::undefined();
});
Expand Down

0 comments on commit db09e7c

Please sign in to comment.