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

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

Issue 2441583002: Revert of [inspector] migrate stepping related methods to debug-interface (Closed)
Patch Set: 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 91a365a0e22ddb008477f23655cf9744f3438589..9ef84ecfb71f601f116d45e6823e83df6e473ed2 100644
--- a/src/inspector/v8-debugger.cc
+++ b/src/inspector/v8-debugger.cc
@@ -17,6 +17,8 @@
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";
@@ -313,27 +315,37 @@
void V8Debugger::stepIntoStatement() {
DCHECK(isPaused());
DCHECK(!m_executionState.IsEmpty());
- v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepIn);
+ v8::HandleScope handleScope(m_isolate);
+ v8::Local<v8::Value> argv[] = {m_executionState};
+ callDebuggerMethod(stepIntoV8MethodName, 1, argv);
continueProgram();
}
void V8Debugger::stepOverStatement() {
DCHECK(isPaused());
DCHECK(!m_executionState.IsEmpty());
- v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepNext);
+ v8::HandleScope handleScope(m_isolate);
+ v8::Local<v8::Value> argv[] = {m_executionState};
+ callDebuggerMethod("stepOverStatement", 1, argv);
continueProgram();
}
void V8Debugger::stepOutOfFunction() {
DCHECK(isPaused());
DCHECK(!m_executionState.IsEmpty());
- v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepOut);
+ v8::HandleScope handleScope(m_isolate);
+ v8::Local<v8::Value> argv[] = {m_executionState};
+ callDebuggerMethod(stepOutV8MethodName, 1, argv);
continueProgram();
}
void V8Debugger::clearStepping() {
DCHECK(enabled());
- v8::DebugInterface::ClearStepping(m_isolate);
+ v8::HandleScope scope(m_isolate);
+ v8::Context::Scope contextScope(debuggerContext());
+
+ v8::Local<v8::Value> argv[] = {v8::Undefined(m_isolate)};
+ callDebuggerMethod("clearStepping", 0, argv);
}
bool V8Debugger::setScriptSource(
@@ -532,11 +544,14 @@
m_executionState.Clear();
if (result == V8DebuggerAgentImpl::RequestStepFrame) {
- v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepFrame);
+ v8::Local<v8::Value> argv[] = {executionState};
+ callDebuggerMethod("stepFrameStatement", 1, argv);
} else if (result == V8DebuggerAgentImpl::RequestStepInto) {
- v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepIn);
+ v8::Local<v8::Value> argv[] = {executionState};
+ callDebuggerMethod(stepIntoV8MethodName, 1, argv);
} else if (result == V8DebuggerAgentImpl::RequestStepOut) {
- v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepOut);
+ v8::Local<v8::Value> argv[] = {executionState};
+ callDebuggerMethod(stepOutV8MethodName, 1, argv);
}
}
« 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