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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 return; | 621 return; |
622 } | 622 } |
623 DCHECK(hitBreakpoints->IsArray()); | 623 DCHECK(hitBreakpoints->IsArray()); |
624 handleProgramBreak(pausedContext, execState, v8::Local<v8::Value>(), | 624 handleProgramBreak(pausedContext, execState, v8::Local<v8::Value>(), |
625 hitBreakpoints.As<v8::Array>()); | 625 hitBreakpoints.As<v8::Array>()); |
626 } | 626 } |
627 | 627 |
628 void V8Debugger::ExceptionThrown(v8::Local<v8::Context> pausedContext, | 628 void V8Debugger::ExceptionThrown(v8::Local<v8::Context> pausedContext, |
629 v8::Local<v8::Object> execState, | 629 v8::Local<v8::Object> execState, |
630 v8::Local<v8::Value> exception, | 630 v8::Local<v8::Value> exception, |
631 bool isPromiseRejection, bool isUncaught) { | 631 v8::Local<v8::Value> promise, |
| 632 bool isUncaught) { |
| 633 bool isPromiseRejection = promise->IsPromise(); |
632 handleProgramBreak(pausedContext, execState, exception, | 634 handleProgramBreak(pausedContext, execState, exception, |
633 v8::Local<v8::Array>(), isPromiseRejection, isUncaught); | 635 v8::Local<v8::Array>(), isPromiseRejection, isUncaught); |
634 } | 636 } |
635 | 637 |
636 bool V8Debugger::IsFunctionBlackboxed(v8::Local<v8::debug::Script> script, | 638 bool V8Debugger::IsFunctionBlackboxed(v8::Local<v8::debug::Script> script, |
637 const v8::debug::Location& start, | 639 const v8::debug::Location& start, |
638 const v8::debug::Location& end) { | 640 const v8::debug::Location& end) { |
639 V8DebuggerAgentImpl* agent = agentForScript(m_inspector, script); | 641 V8DebuggerAgentImpl* agent = agentForScript(m_inspector, script); |
640 if (!agent) return false; | 642 if (!agent) return false; |
641 return agent->isFunctionBlackboxed(String16::fromInteger(script->Id()), start, | 643 return agent->isFunctionBlackboxed(String16::fromInteger(script->Id()), start, |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 | 979 |
978 size_t stackSize = | 980 size_t stackSize = |
979 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; | 981 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; |
980 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) | 982 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) |
981 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; | 983 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; |
982 | 984 |
983 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); | 985 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); |
984 } | 986 } |
985 | 987 |
986 } // namespace v8_inspector | 988 } // namespace v8_inspector |
OLD | NEW |