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

Unified Diff: src/execution.cc

Issue 300553008: Some debugger-related clean-ups and renamings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « src/execution.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index fb2444c20af96b257c9de1570ef61c0a09efd2b7..1c8b0b9bb80a8ba5d96a6218f1525ceaa4e8c557 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -654,60 +654,6 @@ Handle<String> Execution::GetStackTraceLine(Handle<Object> recv,
}
-void Execution::DebugBreakHelper(Isolate* isolate) {
- // Just continue if breaks are disabled.
- if (isolate->debug()->disable_break()) return;
-
- // Ignore debug break during bootstrapping.
- if (isolate->bootstrapper()->IsActive()) return;
-
- // Ignore debug break if debugger is not active.
- if (!isolate->debug()->is_active()) return;
-
- StackLimitCheck check(isolate);
- if (check.HasOverflowed()) return;
-
- { JavaScriptFrameIterator it(isolate);
- ASSERT(!it.done());
- Object* fun = it.frame()->function();
- if (fun && fun->IsJSFunction()) {
- // Don't stop in builtin functions.
- if (JSFunction::cast(fun)->IsBuiltin()) return;
- GlobalObject* global = JSFunction::cast(fun)->context()->global_object();
- // Don't stop in debugger functions.
- if (isolate->debug()->IsDebugGlobal(global)) return;
- }
- }
-
- // Collect the break state before clearing the flags.
- bool debug_command_only = isolate->stack_guard()->CheckDebugCommand() &&
- !isolate->stack_guard()->CheckDebugBreak();
-
- isolate->stack_guard()->ClearDebugBreak();
-
- Execution::ProcessDebugMessages(isolate, debug_command_only);
-}
-
-
-void Execution::ProcessDebugMessages(Isolate* isolate,
- bool debug_command_only) {
- isolate->stack_guard()->ClearDebugCommand();
-
- StackLimitCheck check(isolate);
- if (check.HasOverflowed()) return;
-
- HandleScope scope(isolate);
- // Enter the debugger. Just continue if we fail to enter the debugger.
- EnterDebugger debugger(isolate);
- if (debugger.FailedToEnter()) return;
-
- // Notify the debug event listeners. Indicate auto continue if the break was
- // a debug command break.
- isolate->debug()->OnDebugBreak(isolate->factory()->undefined_value(),
- debug_command_only);
-}
-
-
Object* StackGuard::HandleInterrupts() {
bool has_api_interrupt = false;
{
@@ -721,7 +667,7 @@ Object* StackGuard::HandleInterrupts() {
}
if (CheckDebugBreak() || CheckDebugCommand()) {
- Execution::DebugBreakHelper(isolate_);
+ isolate_->debug()->DebugBreakHelper();
}
if (CheckAndClearInterrupt(TERMINATE_EXECUTION, access)) {
« no previous file with comments | « src/execution.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698