angular-cn/packages/core
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
..
src fix(core): stop reusing provider definitions across NgModuleRef instances (#25022) 2018-07-23 08:13:29 -07:00
test fix(core): stop reusing provider definitions across NgModuleRef instances (#25022) 2018-07-23 08:13:29 -07:00
testing refactor: infer type for `it()` assertion functions (#19904) 2018-07-06 13:48:02 -07:00
BUILD.bazel ci(ivy): configure CI environments for Ivy JIT and AOT (#24309) 2018-06-08 13:34:27 -07:00
index.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
package.json build: update to rxjs@6.0.0 (#23679) 2018-05-03 10:53:39 -07:00
public_api.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00
rollup.config.js feat(ivy): first steps towards JIT compilation (#23833) 2018-05-21 19:13:50 -04:00
tsconfig-build.json refactor(bazel): convert most ts_library to ng_module (#22176) 2018-02-15 14:08:53 -08:00