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 canary] Support tagless components in fastboot #12829

Merged
merged 1 commit into from
Jan 18, 2016

Commits on Jan 17, 2016

  1. [BUGFIX canary] Support tagless components in fastboot

    Attempting to render a component with `tagName: ''` in fastboot kills the fastboot server with a stack trace that looks like:
    
    ```
    undefined:55214
          _emberViewsSystemJquery.default(rootElement).off('.ember', '**').removeC
                                         ^
    TypeError: undefined is not a function
        at exports.default._emberRuntimeSystemObject.default.extend.destroy (<anonymous>:55214:38)
        at superWrapper [as destroy] (<anonymous>:33934:22)
        at <anonymous>:11887:16
        at eachDestroyable (<anonymous>:12166:9)
        at Object.Container.destroy (<anonymous>:11885:7)
        at Object.Backburner.run (<anonymous>:11256:25)
        at Object.run [as default] (<anonymous>:31959:27)
        at exports.default._emberMetalMixin.Mixin.create.willDestroy (<anonymous>:44068:36)
        at superWrapper (<anonymous>:33934:22)
        at _emberRuntimeSystemObject.default.extend.willDestroy (<anonymous>:15925:19)
    
    ```
    
    The root cause is that initializing a tagless component causes a lookup of `event_dispatcher:main`. This actually succeeds, and the `EventDispatcher` doesn't try to do anything, but then during container teardown the EventDispatcher's `destroy` method throws the above exception.
    
    To make any future bugs in this class more obvious, I added an assertion in `EventDispatcher` so that it will fail faster if you try to instantiate it in fastboot mode.
    ef4 committed Jan 17, 2016
    Configuration menu
    Copy the full SHA
    a844921 View commit details
    Browse the repository at this point in the history