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 beta] Fix a few bugs in the caching ArrayProxy implementation #16179

Merged
merged 1 commit into from
Jan 27, 2018

Conversation

mmun
Copy link
Member

@mmun mmun commented Jan 27, 2018

  • Fix handling of negative indexes: arrayProxy.replace(-1, 0, [obj]);
  • Change arrangedContent observer to use private PROPERTY_DID_CHANGE. See the test "should update if content changes while change events are deferred" for an example of why this is needed. This was also causing the ember-data tests to fail.
  • Optimize arrayProxy.get('length') so that it no longer triggers the objects cache to revalidate.
  • Changed the length computed property to be volatile since we are handling the cache ourselves.
  • Added a comment explaining what the this._objectsDirtyIndex field is doing.
    • Switch to using -1 as a sentinel instead of undefined.

I've confirmed locally that this fixes the failing test in ember-data.

@mmun mmun assigned mmun and unassigned mmun Jan 27, 2018
@mmun mmun requested a review from rwjblue January 27, 2018 07:48
@rwjblue rwjblue changed the title [BUGFIX] Fix a few bugs in the caching ArrayProxy implementation [BUGFIX beta] Fix a few bugs in the caching ArrayProxy implementation Jan 27, 2018
@rwjblue
Copy link
Member

rwjblue commented Jan 27, 2018

This will need to be pulled into beta (as the bug it fixes is also in beta)...

@rwjblue rwjblue merged commit 9a4dd3f into master Jan 27, 2018
@rwjblue rwjblue deleted the array-proxy-fixes branch January 27, 2018 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants