| 51 | })(); |
| 52 | |
| 53 | class WtfZoneSpec implements ZoneSpec { |
| 54 | name: string = 'WTF'; |
| 55 | |
| 56 | static forkInstance = wtfEnabled |
| 57 | ? wtfEvents!.createInstance('Zone:fork(ascii zone, ascii newZone)') |
| 58 | : null; |
| 59 | static scheduleInstance: {[key: string]: WtfEventFn} = {}; |
| 60 | static cancelInstance: {[key: string]: WtfEventFn} = {}; |
| 61 | static invokeScope: {[key: string]: WtfEventFn} = {}; |
| 62 | static invokeTaskScope: {[key: string]: WtfEventFn} = {}; |
| 63 | |
| 64 | onFork( |
| 65 | parentZoneDelegate: ZoneDelegate, |
| 66 | currentZone: Zone, |
| 67 | targetZone: Zone, |
| 68 | zoneSpec: ZoneSpec, |
| 69 | ): Zone { |
| 70 | const retValue = parentZoneDelegate.fork(targetZone, zoneSpec); |
| 71 | WtfZoneSpec.forkInstance!(zonePathName(targetZone), retValue.name); |
| 72 | return retValue; |
| 73 | } |
| 74 | |
| 75 | onInvoke( |
| 76 | parentZoneDelegate: ZoneDelegate, |
| 77 | currentZone: Zone, |
| 78 | targetZone: Zone, |
| 79 | delegate: Function, |
| 80 | applyThis: any, |
| 81 | applyArgs?: any[], |
| 82 | source?: string, |
| 83 | ): any { |
| 84 | const src = source || 'unknown'; |
| 85 | let scope = WtfZoneSpec.invokeScope[src]; |
| 86 | if (!scope) { |
| 87 | scope = WtfZoneSpec.invokeScope[src] = wtfEvents!.createScope( |
| 88 | `Zone:invoke:${source}(ascii zone)`, |
| 89 | ); |
| 90 | } |
| 91 | return wtfTrace!.leaveScope( |
| 92 | scope(zonePathName(targetZone)), |
| 93 | parentZoneDelegate.invoke(targetZone, delegate, applyThis, applyArgs, source), |
| 94 | ); |
| 95 | } |
| 96 | |
| 97 | onHandleError( |
| 98 | parentZoneDelegate: ZoneDelegate, |
| 99 | currentZone: Zone, |
| 100 | targetZone: Zone, |
| 101 | error: any, |
| 102 | ): boolean { |
| 103 | return parentZoneDelegate.handleError(targetZone, error); |
| 104 | } |
| 105 | |
| 106 | onScheduleTask( |
| 107 | parentZoneDelegate: ZoneDelegate, |
| 108 | currentZone: Zone, |
| 109 | targetZone: Zone, |
| 110 | task: Task, |
nothing calls this directly
no test coverage detected
searching dependent graphs…