Revision: 21479
Author:   [email protected]
Date:     Mon May 26 08:05:04 2014 UTC
Log:      Fix memory leak in the debugger.

[email protected]

Review URL: https://codereview.chromium.org/297373002
http://code.google.com/p/v8/source/detail?r=21479

Modified:
 /branches/bleeding_edge/src/debug.cc
 /branches/bleeding_edge/src/isolate.cc

=======================================
--- /branches/bleeding_edge/src/debug.cc        Mon May 26 07:05:56 2014 UTC
+++ /branches/bleeding_edge/src/debug.cc        Mon May 26 08:05:04 2014 UTC
@@ -805,6 +805,8 @@


 void Debug::Unload() {
+  ClearAllBreakPoints();
+
   // Return debugger is not loaded.
   if (!IsLoaded()) return;

@@ -3150,7 +3152,6 @@
     activate = debug->Load();
   } else if (debug->IsLoaded() && !activate) {
     isolate_->compilation_cache()->Enable();
-    debug->ClearAllBreakPoints();
     debug->Unload();
   }
   is_active_ = activate;
=======================================
--- /branches/bleeding_edge/src/isolate.cc      Fri May 23 11:12:25 2014 UTC
+++ /branches/bleeding_edge/src/isolate.cc      Mon May 26 08:05:04 2014 UTC
@@ -1562,6 +1562,8 @@
   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