angular-cn/packages/core/test/linker
Vikram Subramanian 6b859daea4 fix(core): stop reusing provider definitions across NgModuleRef instances (#25022)
Fixes #25018.

Instantiating a NgModuleRef from NgModuleFactory reuses the NgModuleDefinition if it is already present. However the NgModuleDefinition has a providers array which modified when tree shakable providers are instantiated. This corrupts the provider definitions the next time the same factory is used to create a new NgModuleRef - Two provider definitions can end up with the same index anf the injector could potentially return a completely wrong object for a provider token.

This scenario is more likely on the server where the same NgModuleFactory is reused across requests.

The fix clones the cached NgModuleDefinition so that any tree shakable providers added later do not affect the cached copy.

PR Close #25022
2018-07-23 08:13:29 -07:00
..
change_detection_integration_spec.ts build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
entry_components_integration_spec.ts style: typos fixed - https://github.com/vlajos/misspell-fixer (#22975) 2018-03-27 14:51:53 -04:00
integration_spec.ts test: make `NgMatchers` type-aware (#19904) 2018-07-06 13:48:02 -07:00
jit_summaries_integration_spec.ts fix(core): add stacktrace in log when error during cleanup component in TestBed (#22162) 2018-02-13 11:28:08 -08:00
ng_container_integration_spec.ts build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
ng_module_integration_spec.ts fix(core): stop reusing provider definitions across NgModuleRef instances (#25022) 2018-07-23 08:13:29 -07:00
projection_integration_spec.ts build(core): remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
query_integration_spec.ts build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
query_list_spec.ts fix(core): ensure initial value of QueryList length (#21980) (#21982) 2018-02-07 12:08:44 -08:00
regression_integration_spec.ts build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
security_integration_spec.ts build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
source_map_integration_node_only_spec.ts build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
system_ng_module_factory_loader_spec.ts build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
view_injector_integration_spec.ts test: make `NgMatchers` type-aware (#19904) 2018-07-06 13:48:02 -07:00