(name: string, fn: PatchFn, ignoreDuplicate = false)
| 809 | } |
| 810 | |
| 811 | static __load_patch(name: string, fn: PatchFn, ignoreDuplicate = false): void { |
| 812 | if (Object.hasOwn(patches, name)) { |
| 813 | // `checkDuplicate` option is defined from global variable |
| 814 | // so it works for all modules. |
| 815 | // `ignoreDuplicate` can work for the specified module |
| 816 | const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true; |
| 817 | if (!ignoreDuplicate && checkDuplicate) { |
| 818 | throw Error('Already loaded patch: ' + name); |
| 819 | } |
| 820 | } else if (!global['__Zone_disable_' + name]) { |
| 821 | const perfName = 'Zone:' + name; |
| 822 | mark(perfName); |
| 823 | patches[name] = fn(global, ZoneImpl, _api); |
| 824 | performanceMeasure(perfName, perfName); |
| 825 | } |
| 826 | } |
| 827 | |
| 828 | public get parent(): AmbientZone | null { |
| 829 | return this._parent; |
nothing calls this directly
no test coverage detected