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] Avoid storing container on the prototype. #15163

Merged
merged 1 commit into from
Apr 24, 2017

Commits on Apr 24, 2017

  1. [BUGFIX beta] Avoid storing container on the prototype.

    In order to support `this.container` (deprecated since 2.3) being available
    to objects for backwards compatibility, we define the `container` property
    on all classes that we instantiate via normal DI APIs.
    
    The bulk of the work to support this was done in prior refactorings. This
    change is targetted at ensuring that we do not leak the container instance
    onto the object's prototype in the `CONTAINER_OVERRIDE` slot.
    
    After these changes, we still support all of the APIs that we supported
    previously, but will fallback to the current objects owner `__container__`
    property (instead of storing it on the prototype directly).
    
    Also, the test being updated here was not providing the `owner` to the
    container in the unit test. This test being changed was previously only
    doing part of the required setup for creating a `registry` / `container` /
    `owner` group.
    rwjblue committed Apr 24, 2017
    Configuration menu
    Copy the full SHA
    4cd5b80 View commit details
    Browse the repository at this point in the history