New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track nested updates per root #10574

Merged
merged 1 commit into from Aug 31, 2017

Conversation

Projects
None yet
4 participants
@acdlite
Member

acdlite commented Aug 30, 2017

We track nested updates to simulate a stack overflow error and prevent infinite loops. Every time we commit a tree, we increment a counter. This works if you only have one tree, but if you update many separate trees, it creates a false negative.

The fix is to reset the counter whenever we switch trees.

@sebmarkbage

This has a bug in it. If two roots update every unit of work, in the same order. Then the second one will never reset and eventually throw.

@acdlite

This comment has been minimized.

Show comment
Hide comment
@acdlite
Member

acdlite commented Aug 30, 2017

@sebmarkbage Updated

Track nested updates per root
We track nested updates to simulate a stack overflow error and prevent
infinite loops. Every time we commit a tree, we increment a counter.
This works if you only have one tree, but if you update many separate
trees, it creates a false negative.

The fix is to reset the counter whenever we switch trees.

@acdlite acdlite merged commit a6e34cc into facebook:master Aug 31, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@bvaughn bvaughn referenced this pull request Sep 7, 2017

Closed

React 16 RC #10294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment