Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(757)

Unified Diff: src/debug.cc

Issue 9620003: Fix ~EnterDebugger eating TerminateExecution requests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698