-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX release] Make ArrayProxy Lazy
This PR refactors ArrayProxy to only begin observing the proxied array's changes the first time the proxy is actually used. This fixes a number of bugs that have popped up recently, and also ensures that ArrayProxy creation does not accidentally entangle with the autotracking stack. It also simplifies the code overall, and conceptually is more in line with the way that autotracking works. In addition, it adds a CUSTOM_TAG_FOR to the proxy, to forward the `[]` and `length` tags from its content directly rather than attempting to managed them itself. This keeps the system from encountering issues related to tag updates, and from needing to re-notify when changes are propagated. As part of fixing this, I also discovered that the `hasArrayObservers` API has been broken since ~3.11. I fixed it and added a test. (cherry picked from commit 8bbedfa)
- Loading branch information
1 parent
6ff73f9
commit 95430d1
Showing
7 changed files
with
97 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters