mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
feat(core): import AsyncStackTaggingZone if available (#46693)
Import `AsyncStackTaggingZoneSpec` if the user imported `zone.js/plugins/async-stack-tagging` bundle. So the user can use `console.trace` to output the `async task` information more clearly. PR Close #46693
This commit is contained in:
parent
848a00956e
commit
19e6d9ccd3
3 changed files with 10 additions and 5 deletions
|
|
@ -12,7 +12,7 @@
|
|||
"aio-local": {
|
||||
"uncompressed": {
|
||||
"runtime": 4325,
|
||||
"main": 459842,
|
||||
"main": 460353,
|
||||
"polyfills": 33922,
|
||||
"styles": 73640,
|
||||
"light-theme": 78276,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"cli-hello-world": {
|
||||
"uncompressed": {
|
||||
"runtime": 1083,
|
||||
"main": 125325,
|
||||
"main": 125830,
|
||||
"polyfills": 33824
|
||||
}
|
||||
},
|
||||
|
|
@ -19,14 +19,14 @@
|
|||
"cli-hello-world-ivy-compat": {
|
||||
"uncompressed": {
|
||||
"runtime": 1102,
|
||||
"main": 132311,
|
||||
"main": 132816,
|
||||
"polyfills": 33957
|
||||
}
|
||||
},
|
||||
"cli-hello-world-ivy-i18n": {
|
||||
"uncompressed": {
|
||||
"runtime": 926,
|
||||
"main": 124982,
|
||||
"main": 125487,
|
||||
"polyfills": 35252
|
||||
}
|
||||
},
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
"standalone-bootstrap": {
|
||||
"uncompressed": {
|
||||
"runtime": 1090,
|
||||
"main": 83013,
|
||||
"main": 83515,
|
||||
"polyfills": 33945
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -138,6 +138,11 @@ export class NgZone {
|
|||
|
||||
self._outer = self._inner = Zone.current;
|
||||
|
||||
if ((Zone as any)['AsyncStackTaggingZoneSpec']) {
|
||||
const AsyncStackTaggingZoneSpec = (Zone as any)['AsyncStackTaggingZoneSpec'];
|
||||
self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));
|
||||
}
|
||||
|
||||
if ((Zone as any)['TaskTrackingZoneSpec']) {
|
||||
self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue