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