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

Unified Diff: src/inspector/v8-debugger.cc

Issue 2423153002: [inspector] migrate stepping related methods to debug-interface (Closed)
Patch Set: we use ClearStepping to cancel stepFrame Created 4 years, 2 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/inspector/debugger_script_externs.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger.cc
diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc
index 9ef84ecfb71f601f116d45e6823e83df6e473ed2..91a365a0e22ddb008477f23655cf9744f3438589 100644
--- a/src/inspector/v8-debugger.cc
+++ b/src/inspector/v8-debugger.cc
@@ -17,8 +17,6 @@
namespace v8_inspector {
namespace {
-const char stepIntoV8MethodName[] = "stepIntoStatement";
-const char stepOutV8MethodName[] = "stepOutOfFunction";
static const char v8AsyncTaskEventEnqueue[] = "enqueue";
static const char v8AsyncTaskEventEnqueueRecurring[] = "enqueueRecurring";
static const char v8AsyncTaskEventWillHandle[] = "willHandle";
@@ -315,37 +313,27 @@ void V8Debugger::continueProgram() {
void V8Debugger::stepIntoStatement() {
DCHECK(isPaused());
DCHECK(!m_executionState.IsEmpty());
- v8::HandleScope handleScope(m_isolate);
- v8::Local<v8::Value> argv[] = {m_executionState};
- callDebuggerMethod(stepIntoV8MethodName, 1, argv);
+ v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepIn);
continueProgram();
}
void V8Debugger::stepOverStatement() {
DCHECK(isPaused());
DCHECK(!m_executionState.IsEmpty());
- v8::HandleScope handleScope(m_isolate);
- v8::Local<v8::Value> argv[] = {m_executionState};
- callDebuggerMethod("stepOverStatement", 1, argv);
+ v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepNext);
continueProgram();
}
void V8Debugger::stepOutOfFunction() {
DCHECK(isPaused());
DCHECK(!m_executionState.IsEmpty());
- v8::HandleScope handleScope(m_isolate);
- v8::Local<v8::Value> argv[] = {m_executionState};
- callDebuggerMethod(stepOutV8MethodName, 1, argv);
+ v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepOut);
continueProgram();
}
void V8Debugger::clearStepping() {
DCHECK(enabled());
- v8::HandleScope scope(m_isolate);
- v8::Context::Scope contextScope(debuggerContext());
-
- v8::Local<v8::Value> argv[] = {v8::Undefined(m_isolate)};
- callDebuggerMethod("clearStepping", 0, argv);
+ v8::DebugInterface::ClearStepping(m_isolate);
}
bool V8Debugger::setScriptSource(
@@ -544,14 +532,11 @@ void V8Debugger::handleProgramBreak(v8::Local<v8::Context> pausedContext,
m_executionState.Clear();
if (result == V8DebuggerAgentImpl::RequestStepFrame) {
- v8::Local<v8::Value> argv[] = {executionState};
- callDebuggerMethod("stepFrameStatement", 1, argv);
+ v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepFrame);
} else if (result == V8DebuggerAgentImpl::RequestStepInto) {
- v8::Local<v8::Value> argv[] = {executionState};
- callDebuggerMethod(stepIntoV8MethodName, 1, argv);
+ v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepIn);
} else if (result == V8DebuggerAgentImpl::RequestStepOut) {
- v8::Local<v8::Value> argv[] = {executionState};
- callDebuggerMethod(stepOutV8MethodName, 1, argv);
+ v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepOut);
}
}
« no previous file with comments | « src/inspector/debugger_script_externs.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698