Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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. (cherry picked from commit 4cd5b80)
- Loading branch information