Commit a5f0489e authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix memory leak in the debugger.

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/297373002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b4394e5b
......@@ -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;
......
......@@ -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_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment