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] Suspend observer deactivation during property changes #18774

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Feb 27, 2020

We accidentally removed some tests for timing changes in observers when
we were originally refactoring observers. This PR adds these tests back,
and suspends deactivation of observers until after property changes have
completed and observers have been properly fired.

@@ -1,6 +1,6 @@
import { Meta, peekMeta } from '@ember/-internals/meta';
import { symbol } from '@ember/-internals/utils';
import { flushSyncObservers } from './observer';
import { flushSyncObservers, resumeObserverDeactivation, suspendedObserverDeactivation } from './observer';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ eslint . --cache --ext=js,ts
/home/travis/build/emberjs/ember.js/packages/@ember/-internals/metal/lib/property_events.ts
  3:9  error  Replace `·flushSyncObservers,·resumeObserverDeactivation,·suspendedObserverDeactivation·` with `⏎··flushSyncObservers,⏎··resumeObserverDeactivation,⏎··suspendedObserverDeactivation,⏎`  prettier/prettier
✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

We accidentally removed some tests for timing changes in observers when
we were originally refactoring observers. This PR adds these tests back,
and suspends deactivation of observers until after property changes have
completed and observers have been properly fired.
@pzuraq pzuraq merged commit fbdcb9c into master Feb 28, 2020
@pzuraq pzuraq deleted the bugfix/fix-property-changes branch February 28, 2020 00:16
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.

3 participants