diff --git a/src/debug.cc b/src/debug.cc index 900821beaf..0af63f61fd 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -805,6 +805,8 @@ bool Debug::Load() { void Debug::Unload() { + ClearAllBreakPoints(); + // Return debugger is not loaded. if (!IsLoaded()) return; @@ -3150,7 +3152,6 @@ void Debugger::UpdateState() { activate = debug->Load(); } else if (debug->IsLoaded() && !activate) { isolate_->compilation_cache()->Enable(); - debug->ClearAllBreakPoints(); debug->Unload(); } is_active_ = activate; diff --git a/src/isolate.cc b/src/isolate.cc index 9572046a40..86e60e2c79 100644 --- a/src/isolate.cc +++ b/src/isolate.cc @@ -1562,6 +1562,8 @@ void Isolate::Deinit() { if (state_ == INITIALIZED) { TRACE_ISOLATE(deinit); + debug()->Unload(); + if (concurrent_recompilation_enabled()) { optimizing_compiler_thread_->Stop(); delete optimizing_compiler_thread_;