()
| 39 | } |
| 40 | |
| 41 | enable() { |
| 42 | if (!this.#enabled) { |
| 43 | this.#enabled = true; |
| 44 | this.#handle.enable(); |
| 45 | enabledTracingObjects.add(this); |
| 46 | if (enabledTracingObjects.size > kMaxTracingCount) { |
| 47 | process.emitWarning( |
| 48 | 'Possible trace_events memory leak detected. There are more than ' + |
| 49 | `${kMaxTracingCount} enabled Tracing objects.`, |
| 50 | ); |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | disable() { |
| 56 | if (this.#enabled) { |
no test coverage detected