mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:44:27 +00:00
[ 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:
parent
e7f75e11ae
commit
698800a902
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue