diff --git a/tooling/static/inspector.cpp b/tooling/static/inspector.cpp index cc55c7c02d0e053e04650416edec6db8af47d33a..1fc2044f3c959b95dbf19b0f5858199670ee3063 100644 --- a/tooling/static/inspector.cpp +++ b/tooling/static/inspector.cpp @@ -715,10 +715,10 @@ void Inspector::ReplyNativeCalling(PtThread thread) void Inspector::ProfilerSetSamplingInterval(int32_t interval) { os::memory::ReadLockHolder lock(vmDeathLock_); - if (UNLIKELY(CheckVmDead())) { + if (UNLIKELY(CheckVmDead() || interval < 0)) { return; } - samplingInterval_ = interval; + samplingInterval_ = static_cast(interval); } Expected Inspector::ProfilerStart()