Skip to content

Commit f3436dd

Browse files
committed
address comments
1 parent 3c345c2 commit f3436dd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

bindings/profiler.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,10 @@ NAN_METHOD(StartProfiling) {
275275
// profile is collected, there cannot be multiple CPU profiling requests
276276
// inflight in parallel.
277277
if (cpuProfiler) {
278-
return Nan::ThrowError("CPU profiler is already started.");
278+
return Nan::ThrowError("CPU profiler is already started or has already been stopped and destroyed.");
279279
}
280280
cpuProfiler = CpuProfiler::New(v8::Isolate::GetCurrent());
281-
// The default sampling interval is 1000us. If the sampling interval is
282-
// different, set the sampling interval.
283-
if (samplingIntervalUS != 1000) {
284-
cpuProfiler->SetSamplingInterval(samplingIntervalUS);
285-
}
281+
cpuProfiler->SetSamplingInterval(samplingIntervalUS);
286282
#endif
287283

288284
Local<String> name =

0 commit comments

Comments
 (0)