Skip to content
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

Fix non layout #309

Merged
merged 2 commits into from
May 26, 2017
Merged

Fix non layout #309

merged 2 commits into from
May 26, 2017

Commits on May 26, 2017

  1. Lock released between add to pend controller and modifying pend state

    The existing design is pretty fraught with error. We should probably
    rethink this but in the meantime, this fixes a bug where calling
    setNeedsLayout can start failing for nodes.
    
    Essentially the method ASDisplayNodeShouldApplyBridgedWriteToView has
    a side effect of registering a node to apply it's pending state *if*
    it doesn't currently need the pending state applied. My guess is this
    was to avoid continually registering the node and this behavior actually
    helped expose this bug.
    
    The bug: after the node is registered for flushing it's state, several
    code paths released the lock before applying that state to the pending
    state object. Before it could re-obtain the lock to apply it to the pending
    state, the pending state controller flushed it on the main thread.
    
    On subsequent calls to setNeedsLayout, the pending state had pending state
    already (from previous calls which missed the flush) and thus wasn't
    registered for future flushing.
    garrettmoon committed May 26, 2017
    Configuration menu
    Copy the full SHA
    253bce7 View commit details
    Browse the repository at this point in the history
  2. Add changelog

    garrettmoon committed May 26, 2017
    Configuration menu
    Copy the full SHA
    68eb9e5 View commit details
    Browse the repository at this point in the history