Skip to content

Commit cdeffb3

Browse files
committed
fix(ProfilingPlugin): only expose the end method of fsStream
1 parent 883088e commit cdeffb3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/debug/ProfilingPlugin.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Profiler {
7373

7474
/**
7575
* @param {string} outputPath The location where to write the log.
76-
* @returns {{trace: ?, counter: number, profiler: Profiler, fsStream: WriteStream}} The trace object
76+
* @returns {{trace: ?, counter: number, profiler: Profiler, end: Function}} The trace object
7777
*/
7878
function createTrace(outputPath) {
7979
const trace = new Trace({
@@ -121,7 +121,7 @@ function createTrace(outputPath) {
121121
trace,
122122
counter,
123123
profiler,
124-
fsStream
124+
end: (callback) => fsStream.end(callback)
125125
};
126126
}
127127

@@ -181,7 +181,7 @@ class ProfilingPlugin {
181181
if (parsedResults === undefined) {
182182
tracer.profiler.destroy();
183183
tracer.trace.flush();
184-
tracer.fsStream.end(callback);
184+
tracer.end(callback);
185185
return;
186186
}
187187

@@ -229,7 +229,7 @@ class ProfilingPlugin {
229229

230230
tracer.profiler.destroy();
231231
tracer.trace.flush();
232-
tracer.fsStream.end(callback);
232+
tracer.end(callback);
233233
});
234234
}
235235
);

0 commit comments

Comments
 (0)