| 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 ->Call(m_isolate->GetCurrentContext(), object, 0, nullptr) | 552 ->Call(m_isolate->GetCurrentContext(), object, 0, nullptr) |
| 553 .ToLocalChecked(); | 553 .ToLocalChecked(); |
| 554 } | 554 } |
| 555 | 555 |
| 556 void V8Debugger::handleV8DebugEvent( | 556 void V8Debugger::handleV8DebugEvent( |
| 557 const v8::DebugInterface::EventDetails& eventDetails) { | 557 const v8::DebugInterface::EventDetails& eventDetails) { |
| 558 if (!enabled()) return; | 558 if (!enabled()) return; |
| 559 v8::DebugEvent event = eventDetails.GetEvent(); | 559 v8::DebugEvent event = eventDetails.GetEvent(); |
| 560 if (event != v8::AsyncTaskEvent && event != v8::Break && | 560 if (event != v8::AsyncTaskEvent && event != v8::Break && |
| 561 event != v8::Exception && event != v8::AfterCompile && | 561 event != v8::Exception && event != v8::AfterCompile && |
| 562 event != v8::CompileError) | 562 event != v8::BeforeCompile && event != v8::CompileError) |
| 563 return; | 563 return; |
| 564 | 564 |
| 565 v8::Local<v8::Context> eventContext = eventDetails.GetEventContext(); | 565 v8::Local<v8::Context> eventContext = eventDetails.GetEventContext(); |
| 566 DCHECK(!eventContext.IsEmpty()); | 566 DCHECK(!eventContext.IsEmpty()); |
| 567 | 567 |
| 568 if (event == v8::AsyncTaskEvent) { | 568 if (event == v8::AsyncTaskEvent) { |
| 569 v8::HandleScope scope(m_isolate); | 569 v8::HandleScope scope(m_isolate); |
| 570 handleV8AsyncTaskEvent(eventContext, eventDetails.GetExecutionState(), | 570 handleV8AsyncTaskEvent(eventContext, eventDetails.GetExecutionState(), |
| 571 eventDetails.GetEventData()); | 571 eventDetails.GetEventData()); |
| 572 return; | 572 return; |
| (...skipping 437 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 |