OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/inspector/v8-debugger.h" | 5 #include "src/inspector/v8-debugger.h" |
6 | 6 |
7 #include "src/inspector/debugger-script.h" | 7 #include "src/inspector/debugger-script.h" |
8 #include "src/inspector/protocol/Protocol.h" | 8 #include "src/inspector/protocol/Protocol.h" |
9 #include "src/inspector/script-breakpoint.h" | 9 #include "src/inspector/script-breakpoint.h" |
10 #include "src/inspector/string-util.h" | 10 #include "src/inspector/string-util.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 if (!v8::Function::New(m_isolate->GetCurrentContext(), | 291 if (!v8::Function::New(m_isolate->GetCurrentContext(), |
292 &V8Debugger::breakProgramCallback, | 292 &V8Debugger::breakProgramCallback, |
293 v8::External::New(m_isolate, this), 0, | 293 v8::External::New(m_isolate, this), 0, |
294 v8::ConstructorBehavior::kThrow) | 294 v8::ConstructorBehavior::kThrow) |
295 .ToLocal(&breakFunction)) | 295 .ToLocal(&breakFunction)) |
296 return; | 296 return; |
297 v8::DebugInterface::Call(debuggerContext(), breakFunction).ToLocalChecked(); | 297 v8::DebugInterface::Call(debuggerContext(), breakFunction).ToLocalChecked(); |
298 } | 298 } |
299 | 299 |
300 void V8Debugger::continueProgram() { | 300 void V8Debugger::continueProgram() { |
301 if (isPaused()) m_inspector->client()->quitMessageLoopOnPause(); | 301 if (isPaused()) |
| 302 m_inspector->client()->quitMessageLoopOnPause(getGroupId(m_pausedContext)); |
302 m_pausedContext.Clear(); | 303 m_pausedContext.Clear(); |
303 m_executionState.Clear(); | 304 m_executionState.Clear(); |
304 } | 305 } |
305 | 306 |
306 void V8Debugger::stepIntoStatement() { | 307 void V8Debugger::stepIntoStatement() { |
307 DCHECK(isPaused()); | 308 DCHECK(isPaused()); |
308 DCHECK(!m_executionState.IsEmpty()); | 309 DCHECK(!m_executionState.IsEmpty()); |
309 v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepIn); | 310 v8::DebugInterface::PrepareStep(m_isolate, v8::DebugInterface::StepIn); |
310 continueProgram(); | 311 continueProgram(); |
311 } | 312 } |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 | 974 |
974 size_t stackSize = | 975 size_t stackSize = |
975 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; | 976 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; |
976 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) | 977 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) |
977 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; | 978 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; |
978 | 979 |
979 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); | 980 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); |
980 } | 981 } |
981 | 982 |
982 } // namespace v8_inspector | 983 } // namespace v8_inspector |
OLD | NEW |