perf(change_detection): removed the currentProto property
This commit is contained in:
+3
-8
@@ -34,7 +34,6 @@ class _MyComponent_ChangeDetector0
|
||||
}
|
||||
|
||||
void detectChangesInRecordsInternal(throwOnChange) {
|
||||
this.currentProto = null;
|
||||
var l_context = this.context,
|
||||
l_myNum0,
|
||||
c_myNum0,
|
||||
@@ -43,7 +42,7 @@ class _MyComponent_ChangeDetector0
|
||||
var isChanged = false;
|
||||
var changes = null;
|
||||
|
||||
this.currentProto = this.protos[0];
|
||||
this.firstProtoInCurrentBinding = 1;
|
||||
l_myNum0 = l_context.myNum;
|
||||
if (_gen.looseNotIdentical(l_myNum0, this.myNum0)) {
|
||||
c_myNum0 = true;
|
||||
@@ -51,18 +50,14 @@ class _MyComponent_ChangeDetector0
|
||||
this.myNum0 = l_myNum0;
|
||||
}
|
||||
if (c_myNum0) {
|
||||
this.currentProto = this.protos[1];
|
||||
l_interpolate1 =
|
||||
"Salad: " "${l_myNum0 == null ? "" : l_myNum0}" " is awesome";
|
||||
if (_gen.looseNotIdentical(l_interpolate1, this.interpolate1)) {
|
||||
if (throwOnChange) {
|
||||
_gen.ChangeDetectionUtil.throwOnChange(this.currentProto,
|
||||
_gen.ChangeDetectionUtil.simpleChange(
|
||||
this.interpolate1, l_interpolate1));
|
||||
this.throwOnChangeError(this.interpolate1, l_interpolate1);
|
||||
}
|
||||
|
||||
this.dispatcher.notifyOnBinding(
|
||||
this.currentProto.bindingRecord, l_interpolate1);
|
||||
this.notifyDispatcher(l_interpolate1);
|
||||
|
||||
this.interpolate1 = l_interpolate1;
|
||||
}
|
||||
|
||||
@@ -31,10 +31,10 @@ void changeDetectorTests() {
|
||||
// TODO(tbosch): This is just a temporary test that makes sure that the dart server and
|
||||
// dart browser is in sync. Change this to "not contains notifyBinding"
|
||||
// when https://github.com/angular/angular/issues/3019 is solved.
|
||||
it('shouldn always notifyBinding for template variables', () async {
|
||||
it('shouldn always notifyDispatcher for template variables', () async {
|
||||
var inputPath = 'template_compiler/ng_for_files/hello.ng_deps.dart';
|
||||
var output = await (process(new AssetId('a', inputPath)));
|
||||
expect(output).toContain('notifyOnBinding');
|
||||
expect(output).toContain('notifyDispatcher');
|
||||
});
|
||||
|
||||
it('should include directives mentioned in directive aliases.', () async {
|
||||
|
||||
Reference in New Issue
Block a user