Skip to content

[BUGFIX release] Ensure initializers can augment customEvents.#12056

Merged
rwjblue merged 1 commit intoemberjs:masterfrom
rwjblue:event-dispatcher-stuffs
Aug 11, 2015
Merged

[BUGFIX release] Ensure initializers can augment customEvents.#12056
rwjblue merged 1 commit intoemberjs:masterfrom
rwjblue:event-dispatcher-stuffs

Conversation

@rwjblue
Copy link
Member

@rwjblue rwjblue commented Aug 11, 2015

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.

Fixes #10534.

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.
@rwjblue rwjblue merged commit 0c95d49 into emberjs:master Aug 11, 2015
@rwjblue rwjblue deleted the event-dispatcher-stuffs branch August 11, 2015 19:51
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.

FastBoot changes seem to break setting Application#customEvents within initializer

1 participant