[BUGFIX release] Ensure initializers can augment customEvents.#12056
Merged
rwjblue merged 1 commit intoemberjs:masterfrom Aug 11, 2015
Merged
[BUGFIX release] Ensure initializers can augment customEvents.#12056rwjblue merged 1 commit intoemberjs:masterfrom
rwjblue merged 1 commit intoemberjs:masterfrom
Conversation
The initial refactor for Ember 1.11 to use `ApplicationInstance` broke the ability for an initializer to specify `customEvents`. This meant for example that addons could not add their own events to the listing before the `EventDispatcher` was setup. The reason for the failure, was that we were copying `customEvents` from the application upon `init` of the `ApplicationInstance` (which is done before initializers are called), and never looking at `application.customEvents` again. The fix is to avoid eagerly copying from `application.customEvents` when the application instance is created, and to do it just before setting up the event dispatcher. Also, apparently `packages/tests/application_lifecycle.js` test file was never running because it didn't have the proper test file suffix.
rwjblue
added a commit
that referenced
this pull request
Aug 11, 2015
[BUGFIX release] Ensure initializers can augment customEvents.
This was referenced Aug 11, 2015
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The initial refactor for Ember 1.11 to use
ApplicationInstancebroke the ability for an initializer to specifycustomEvents. This meant for example that addons could not add their own events to the listing before theEventDispatcherwas setup.The reason for the failure, was that we were copying
customEventsfrom the application uponinitof theApplicationInstance(which is done before initializers are called), and never looking atapplication.customEventsagain.The fix is to avoid eagerly copying from
application.customEventswhen the application instance is created, and to do it just before setting up the event dispatcher.Also, apparently
packages/tests/application_lifecycle.jstest file was never running because it didn't have the proper test file suffix.Fixes #10534.