Reviewers: Vyacheslav Egorov,

Message:
Please take a look.

Description:
Fix ~EnterDebugger eating TerminateExecution requests


Please review this at https://chromiumcodereview.appspot.com/9620003/

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

Affected files:
  M src/debug.cc


Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index 2058d48b71e431bf9a89816dbfc47bcf755f11d5..c632378997fcfc0d690757a21fe9a2ac67c45045 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
 // met:
@@ -3234,6 +3234,12 @@ EnterDebugger::~EnterDebugger() {
         debug->set_interrupts_pending(DEBUGBREAK);
         isolate_->stack_guard()->Continue(DEBUGBREAK);
       }
+      // If there is a pending termination request, we don't want to deal
+      // with that now, either.
+      if (isolate_->stack_guard()->IsTerminateExecution()) {
+        debug->set_interrupts_pending(TERMINATE);
+        isolate_->stack_guard()->Continue(TERMINATE);
+      }
       debug->ClearMirrorCache();
     }

@@ -3249,6 +3255,10 @@ EnterDebugger::~EnterDebugger() {
       debug->clear_interrupt_pending(DEBUGBREAK);
       isolate_->stack_guard()->DebugBreak();
     }
+    if (debug->is_interrupt_pending(TERMINATE)) {
+      debug->clear_interrupt_pending(TERMINATE);
+      isolate_->stack_guard()->TerminateExecution();
+    }

     // If there are commands in the queue when leaving the debugger request
     // that these commands are processed.


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to