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

[BUGFIX lts] Fixes ArrayProxy length reactivity #19111

Merged
merged 1 commit into from
Aug 28, 2020
Merged

Commits on Aug 27, 2020

  1. [BUGFIX lts] Fixes ArrayProxy length reactivity

    Recent refactors for performance left a gap in the reactivity model,
    specifically for the `length` property of ArrayProxy. We now only use
    the `CUSTOM_TAG_FOR` API when getting chain tags, which is much better
    for most `get()` usages since we don't have to do an extra brand check
    that is not very commonly used. However, the `length` property of
    ArrayProxy does not have a normal property tag, and it is a native
    getter which does not entangle the value naturally when accessed via
    autotracking.
    
    This PR sets up the `length` tag eagerly whenever the content of the
    ArrayProxy changes, and consumes it when the `length` property is
    accessed. It also does the same thing for the `arrTag`, though that is
    only used for chain tags. Normally, when the array tag is accessed, it
    tracks things properly through the `objectAt` API.
    Chris Garrett committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    f43dce6 View commit details
    Browse the repository at this point in the history