()
| 955 | } |
| 956 | |
| 957 | async cleanup() { |
| 958 | if (this.cleanupStarted) { return; } |
| 959 | this.cleanupStarted = true; |
| 960 | |
| 961 | if (this.timeout !== null) { |
| 962 | clearTimeout(this.timeout); |
| 963 | this.timeout = null; |
| 964 | } |
| 965 | |
| 966 | this.client.reset(); |
| 967 | |
| 968 | if (this.child === null) { return; } |
| 969 | |
| 970 | // TODO(joyeecheung): When we implement attach mode, this teardown must |
| 971 | // resume-and-detach rather than kill, since the target is not ours. |
| 972 | if (this.child.exitCode === null && this.child.signalCode === null) { |
| 973 | this.child.kill(); |
| 974 | } |
| 975 | } |
| 976 | |
| 977 | async run() { |
| 978 | try { |
no test coverage detected