GeezerVison is showing github.com — perf(core): use `ngDevMode` to tree-shake `checkNoChanges` (#39964) · angular/angular@2fbb684
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: goldens/size-tracking/aio-payloads.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
12 | 12 | "master": { |
13 | 13 | "uncompressed": { |
14 | 14 | "runtime-es2015": 3033, |
15 | | - "main-es2015": 447343, |
| 15 | + "main-es2015": 446749, |
16 | 16 | "polyfills-es2015": 52493 |
17 | 17 | } |
18 | 18 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: goldens/size-tracking/integration-payloads.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
3 | 3 | "master": { |
4 | 4 | "uncompressed": { |
5 | 5 | "runtime-es2015": 1485, |
6 | | - "main-es2015": 140899, |
| 6 | + "main-es2015": 134899, |
7 | 7 | "polyfills-es2015": 36571 |
8 | 8 | } |
9 | 9 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/core/src/application_ref.ts +3-4Lines changed: 3 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -573,7 +573,6 @@ export class ApplicationRef { |
573 | 573 | private _bootstrapListeners: ((compRef: ComponentRef<any>) => void)[] = []; |
574 | 574 | private _views: InternalViewRef[] = []; |
575 | 575 | private _runningTick: boolean = false; |
576 | | - private _enforceNoNewChanges: boolean = false; |
577 | 576 | private _stable = true; |
578 | 577 | private _onMicrotaskEmptySubscription: Subscription; |
579 | 578 |
|
@@ -602,8 +601,6 @@ export class ApplicationRef { |
602 | 601 | private _exceptionHandler: ErrorHandler, |
603 | 602 | private _componentFactoryResolver: ComponentFactoryResolver, |
604 | 603 | private _initStatus: ApplicationInitStatus) { |
605 | | - this._enforceNoNewChanges = isDevMode(); |
606 | | - |
607 | 604 | this._onMicrotaskEmptySubscription = this._zone.onMicrotaskEmpty.subscribe({ |
608 | 605 | next: () => { |
609 | 606 | this._zone.run(() => { |
@@ -740,7 +737,9 @@ export class ApplicationRef { |
740 | 737 | for (let view of this._views) { |
741 | 738 | view.detectChanges(); |
742 | 739 | } |
743 | | - if (this._enforceNoNewChanges) { |
| 740 | + // Note that we have still left the `isDevMode()` condition in order to avoid |
| 741 | + // creating a breaking change for projects that still use the View Engine. |
| 742 | + if ((typeof ngDevMode === 'undefined' || ngDevMode) && isDevMode()) { |
744 | 743 | for (let view of this._views) { |
745 | 744 | view.checkNoChanges(); |
746 | 745 | } |
|