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/inspected-context.h" | 8 #include "src/inspector/inspected-context.h" |
9 #include "src/inspector/protocol/Protocol.h" | 9 #include "src/inspector/protocol/Protocol.h" |
10 #include "src/inspector/script-breakpoint.h" | 10 #include "src/inspector/script-breakpoint.h" |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 m_executionState = executionState; | 479 m_executionState = executionState; |
480 V8DebuggerAgentImpl::SkipPauseRequest result = agent->didPause( | 480 V8DebuggerAgentImpl::SkipPauseRequest result = agent->didPause( |
481 pausedContext, exception, breakpointIds, isPromiseRejection, isUncaught); | 481 pausedContext, exception, breakpointIds, isPromiseRejection, isUncaught); |
482 if (result == V8DebuggerAgentImpl::RequestNoSkip) { | 482 if (result == V8DebuggerAgentImpl::RequestNoSkip) { |
483 m_runningNestedMessageLoop = true; | 483 m_runningNestedMessageLoop = true; |
484 int groupId = m_inspector->contextGroupId(pausedContext); | 484 int groupId = m_inspector->contextGroupId(pausedContext); |
485 DCHECK(groupId); | 485 DCHECK(groupId); |
486 v8::Context::Scope scope(pausedContext); | 486 v8::Context::Scope scope(pausedContext); |
487 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); | 487 v8::Local<v8::Context> context = m_isolate->GetCurrentContext(); |
488 CHECK(!context.IsEmpty() && | 488 CHECK(!context.IsEmpty() && |
489 context != v8::Debug::GetDebugContext(m_isolate)); | 489 context != v8::debug::GetDebugContext(m_isolate)); |
490 m_inspector->client()->runMessageLoopOnPause(groupId); | 490 m_inspector->client()->runMessageLoopOnPause(groupId); |
491 // The agent may have been removed in the nested loop. | 491 // The agent may have been removed in the nested loop. |
492 agent = m_inspector->enabledDebuggerAgentForGroup( | 492 agent = m_inspector->enabledDebuggerAgentForGroup( |
493 m_inspector->contextGroupId(pausedContext)); | 493 m_inspector->contextGroupId(pausedContext)); |
494 if (agent) agent->didContinue(); | 494 if (agent) agent->didContinue(); |
495 m_runningNestedMessageLoop = false; | 495 m_runningNestedMessageLoop = false; |
496 } | 496 } |
497 m_pausedContext.Clear(); | 497 m_pausedContext.Clear(); |
498 m_executionState.Clear(); | 498 m_executionState.Clear(); |
499 | 499 |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 | 1010 |
1011 size_t stackSize = | 1011 size_t stackSize = |
1012 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; | 1012 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; |
1013 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) | 1013 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) |
1014 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; | 1014 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; |
1015 | 1015 |
1016 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); | 1016 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); |
1017 } | 1017 } |
1018 | 1018 |
1019 } // namespace v8_inspector | 1019 } // namespace v8_inspector |
OLD | NEW |