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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 v8::Local<v8::Object> object, const char* functionName) { | 543 v8::Local<v8::Object> object, const char* functionName) { |
544 v8::MicrotasksScope microtasks(m_isolate, | 544 v8::MicrotasksScope microtasks(m_isolate, |
545 v8::MicrotasksScope::kDoNotRunMicrotasks); | 545 v8::MicrotasksScope::kDoNotRunMicrotasks); |
546 v8::Local<v8::Value> getterValue = | 546 v8::Local<v8::Value> getterValue = |
547 object | 547 object |
548 ->Get(m_isolate->GetCurrentContext(), | 548 ->Get(m_isolate->GetCurrentContext(), |
549 toV8StringInternalized(m_isolate, functionName)) | 549 toV8StringInternalized(m_isolate, functionName)) |
550 .ToLocalChecked(); | 550 .ToLocalChecked(); |
551 DCHECK(!getterValue.IsEmpty() && getterValue->IsFunction()); | 551 DCHECK(!getterValue.IsEmpty() && getterValue->IsFunction()); |
552 return v8::Local<v8::Function>::Cast(getterValue) | 552 return v8::Local<v8::Function>::Cast(getterValue) |
553 ->Call(m_isolate->GetCurrentContext(), object, 0, 0) | 553 ->Call(m_isolate->GetCurrentContext(), object, 0, nullptr) |
554 .ToLocalChecked(); | 554 .ToLocalChecked(); |
555 } | 555 } |
556 | 556 |
557 void V8Debugger::handleV8DebugEvent( | 557 void V8Debugger::handleV8DebugEvent( |
558 const v8::DebugInterface::EventDetails& eventDetails) { | 558 const v8::DebugInterface::EventDetails& eventDetails) { |
559 if (!enabled()) return; | 559 if (!enabled()) return; |
560 v8::DebugEvent event = eventDetails.GetEvent(); | 560 v8::DebugEvent event = eventDetails.GetEvent(); |
561 if (event != v8::AsyncTaskEvent && event != v8::Break && | 561 if (event != v8::AsyncTaskEvent && event != v8::Break && |
562 event != v8::Exception && event != v8::AfterCompile && | 562 event != v8::Exception && event != v8::AfterCompile && |
563 event != v8::BeforeCompile && event != v8::CompileError) | 563 event != v8::BeforeCompile && event != v8::CompileError) |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 | 978 |
979 size_t stackSize = | 979 size_t stackSize = |
980 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; | 980 fullStack ? V8StackTraceImpl::maxCallStackSizeToCapture : 1; |
981 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) | 981 if (m_inspector->enabledRuntimeAgentForGroup(contextGroupId)) |
982 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; | 982 stackSize = V8StackTraceImpl::maxCallStackSizeToCapture; |
983 | 983 |
984 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); | 984 return V8StackTraceImpl::capture(this, contextGroupId, stackSize); |
985 } | 985 } |
986 | 986 |
987 } // namespace v8_inspector | 987 } // namespace v8_inspector |
OLD | NEW |