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] Make Model#data a plain getter. #4545

Merged
merged 1 commit into from
Sep 22, 2016

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Sep 22, 2016

In Ember 2.9, using an Ember.computed.alias or Ember.computed.readOnly automatically adds mandatory setter's getter/setter to the properties being watched, and defers reading the current value to the objects own meta.

This avoids creating an watcher for _internalModel and therefore prevents an error that ocurrs when we attempt to read from meta after the object has been destroyed.

In Ember 2.9, using an `Ember.computed.alias` or
`Ember.computed.readOnly` automatically adds mandatory setter's
getter/setter to the properties being watched, and defers reading the
current value to the objects own meta.

This avoids creating an watcher for `_internalModel` and therefore
prevents an error that ocurrs when we attempt to read from `meta` after
the object has been destroyed.
@bmac bmac merged commit b7ae384 into emberjs:master Sep 22, 2016
@bmac
Copy link
Member

bmac commented Sep 22, 2016

Thanks @rwjblue!

chancancode added a commit to chancancode/emberobserver that referenced this pull request Sep 28, 2016
There is a performance regression with the latest Ember beta that was addressed
in Ember Data 2.8.1 (emberjs/data#4545).
wycats pushed a commit to tildeio/ember-cli-addon-search that referenced this pull request Oct 12, 2016
There is a performance regression with the latest Ember beta that was addressed
in Ember Data 2.8.1 (emberjs/data#4545).
wycats pushed a commit to tildeio/ember-cli-addon-search that referenced this pull request Oct 12, 2016
There is a performance regression with the latest Ember beta that was addressed
in Ember Data 2.8.1 (emberjs/data#4545).
wycats pushed a commit to tildeio/ember-cli-addon-search that referenced this pull request Oct 12, 2016
There is a performance regression with the latest Ember beta that was addressed
in Ember Data 2.8.1 (emberjs/data#4545).
wycats pushed a commit to tildeio/ember-cli-addon-search that referenced this pull request Oct 12, 2016
There is a performance regression with the latest Ember beta that was addressed
in Ember Data 2.8.1 (emberjs/data#4545).
@rwjblue rwjblue deleted the make-data-getter branch May 1, 2019 20:29
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