Revision: 22262
Author: [email protected]
Date: Tue Jul 8 06:57:17 2014 UTC
Log: Reland "Postpone termination exceptions in debug scope."
BUG=v8:3408
LOG=Y
[email protected]
Review URL: https://codereview.chromium.org/364813002
http://code.google.com/p/v8/source/detail?r=22262
Modified:
/branches/bleeding_edge/src/debug.cc
/branches/bleeding_edge/src/debug.h
/branches/bleeding_edge/test/cctest/test-debug.cc
=======================================
--- /branches/bleeding_edge/src/debug.cc Thu Jul 3 17:01:14 2014 UTC
+++ /branches/bleeding_edge/src/debug.cc Tue Jul 8 06:57:17 2014 UTC
@@ -3104,9 +3104,12 @@
}
-DebugScope::DebugScope(Debug* debug) : debug_(debug),
- prev_(debug->debugger_entry()),
- save_(debug_->isolate_) {
+DebugScope::DebugScope(Debug* debug)
+ : debug_(debug),
+ prev_(debug->debugger_entry()),
+ save_(debug_->isolate_),
+ no_termination_exceptons_(debug_->isolate_,
+ StackGuard::TERMINATE_EXECUTION) {
// Link recursive debugger entry.
debug_->thread_local_.current_debug_scope_ = this;
=======================================
--- /branches/bleeding_edge/src/debug.h Thu Jul 3 15:56:01 2014 UTC
+++ /branches/bleeding_edge/src/debug.h Tue Jul 8 06:57:17 2014 UTC
@@ -705,6 +705,7 @@
int break_id_; // Previous break id.
bool failed_; // Did the debug context fail to load?
SaveContext save_; // Saves previous context.
+ PostponeInterruptsScope no_termination_exceptons_;
};
=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Wed Jul 2 08:05:40
2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-debug.cc Tue Jul 8 06:57:17
2014 UTC
@@ -7374,9 +7374,6 @@
// Wait for at most 2 seconds for the terminate request.
CHECK(terminate_fired_semaphore.WaitFor(v8::base::TimeDelta::FromSeconds(2)));
terminate_already_fired = true;
- v8::internal::Isolate* isolate =
-
v8::Utils::OpenHandle(*event_details.GetEventContext())->GetIsolate();
- CHECK(isolate->stack_guard()->CheckTerminateExecution());
}
@@ -7403,6 +7400,8 @@
v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate);
TerminationThread terminator(isolate);
terminator.Start();
+ v8::TryCatch try_catch;
v8::Debug::DebugBreak(isolate);
CompileRun("while (true);");
+ CHECK(try_catch.HasTerminated());
}
--
--
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.