[ VM / Service ] Initialize ThreadInterrupter state even if profiler isn't enabled.

Fixes issue #36586.

Change-Id: I2e3807d00d10e262201295744b6da8249a337e19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99344
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
This commit is contained in:
Ben Konyi 2019-04-16 20:56:39 +00:00
parent e7f75e11ae
commit 698800a902

View file

@ -116,6 +116,10 @@ void ThreadInterrupter::Cleanup() {
// Delay between interrupts.
void ThreadInterrupter::SetInterruptPeriod(intptr_t period) {
if (!initialized_) {
// Profiler may not be enabled.
return;
}
MonitorLocker ml(monitor_);
if (shutdown_) {
return;