From a6736ff9f28733ee85d97f05ed6eb751e69bb2d5 Mon Sep 17 00:00:00 2001 From: Tim Blasi Date: Thu, 2 Apr 2015 15:48:46 -0700 Subject: [PATCH] perf(change detection): Assign this.locals in change detector ctor Set `this.locals = null;` in the ctor of generated change detector classes to prevent the class "shape" from changing on `hydrate`. --- .../src/change_detection/change_detection_jit_generator.es6 | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/angular2/src/change_detection/change_detection_jit_generator.es6 b/modules/angular2/src/change_detection/change_detection_jit_generator.es6 index 008dbd4243..6b3601b89f 100644 --- a/modules/angular2/src/change_detection/change_detection_jit_generator.es6 +++ b/modules/angular2/src/change_detection/change_detection_jit_generator.es6 @@ -64,6 +64,7 @@ ${DISPATCHER_ACCESSOR} = dispatcher; ${PIPE_REGISTRY_ACCESSOR} = pipeRegistry; ${PROTOS_ACCESSOR} = protos; ${MEMENTOS_ACCESSOR} = directiveMementos; +${LOCALS_ACCESSOR} = null; ${fieldsDefinitions} }