Skip to content

Commit c6f0d65

Browse files
committed
fix: release held-passive chain in completeDeferredLayouts
completeDeferredLayouts is an outermost commit boundary (entering at EFFECT_COMMIT_DEPTH 0, operating at depth 1) but never called finishNestedUpdateCommit(). When layout work triggered by deferred layouts armed the held-passive chain (HELD_PASSIVE_CHAIN = NESTED_UPDATE_CHAIN_ID on the 51st nested update), nested commitEffects calls saw depth >= 2 and skipped the closer. The chain ID was never incremented, so drainPassivePhase permanently returned early and held passives and unmount cleanups were stranded. Add the same depth-1 finishNestedUpdateCommit() call that commitEffects uses, so the chain is properly closed when completeDeferredLayouts acts as the outermost commit.
1 parent 1e4edfe commit c6f0d65

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎packages/octane/src/runtime.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9790,6 +9790,7 @@ function completeDeferredLayouts(capture: DeferredLayoutCapture, interrupted = f
97909790
const error = drainLayoutUpdates(null);
97919791
if (error !== null) throw error.err;
97929792
}
9793+
if (EFFECT_COMMIT_DEPTH === 1) finishNestedUpdateCommit();
97939794
} finally {
97949795
capture.commits.length = 0;
97959796
capture.refs.length = 0;

0 commit comments

Comments
 (0)