Reviewers: jarin,

Message:
Please take a look.

The leak is a result of the change here:
https://codereview.chromium.org/299653002/diff/40001/src/isolate.cc

Description:
Fix memory leak in the debugger.

[email protected]

Please review this at https://codereview.chromium.org/297373002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+4, -1 lines):
  M src/debug.cc
  M src/isolate.cc


Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index 900821beaf0471fee3f0f5bb68ba9dfcb866e4ea..0af63f61fdcd63ea3731250c6726d6bf9da46fed 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;
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 9572046a40e01274aeafa9b626ed6c77b48130c7..86e60e2c7939241c2be32f475ebba7397c293321 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_;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to