OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium 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 "config.h" | 5 #include "config.h" |
6 #include "core/inspector/V8DebuggerAgent.h" | 6 #include "core/inspector/V8DebuggerAgent.h" |
7 | 7 |
8 #include "bindings/core/v8/ScriptCallStackFactory.h" | 8 #include "bindings/core/v8/ScriptCallStackFactory.h" |
9 #include "bindings/core/v8/ScriptRegexp.h" | 9 #include "bindings/core/v8/ScriptRegexp.h" |
10 #include "bindings/core/v8/ScriptValue.h" | 10 #include "bindings/core/v8/ScriptValue.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 ASSERT(contextGroupId); | 155 ASSERT(contextGroupId); |
156 m_v8AsyncCallTracker = V8AsyncCallTracker::create(this); | 156 m_v8AsyncCallTracker = V8AsyncCallTracker::create(this); |
157 m_promiseTracker = PromiseTracker::create(this, m_isolate); | 157 m_promiseTracker = PromiseTracker::create(this, m_isolate); |
158 clearBreakDetails(); | 158 clearBreakDetails(); |
159 } | 159 } |
160 | 160 |
161 V8DebuggerAgent::~V8DebuggerAgent() | 161 V8DebuggerAgent::~V8DebuggerAgent() |
162 { | 162 { |
163 } | 163 } |
164 | 164 |
| 165 DEFINE_TRACE(V8DebuggerAgent) |
| 166 { |
| 167 #if ENABLE(OILPAN) |
| 168 visitor->trace(m_injectedScriptManager); |
| 169 visitor->trace(m_asyncCallTrackingListeners); |
| 170 visitor->trace(m_v8AsyncCallTracker); |
| 171 visitor->trace(m_promiseTracker); |
| 172 visitor->trace(m_asyncOperations); |
| 173 visitor->trace(m_currentAsyncCallChain); |
| 174 #endif |
| 175 } |
| 176 |
165 bool V8DebuggerAgent::checkEnabled(ErrorString* errorString) | 177 bool V8DebuggerAgent::checkEnabled(ErrorString* errorString) |
166 { | 178 { |
167 if (enabled()) | 179 if (enabled()) |
168 return true; | 180 return true; |
169 *errorString = "Debugger agent is not enabled"; | 181 *errorString = "Debugger agent is not enabled"; |
170 return false; | 182 return false; |
171 } | 183 } |
172 | 184 |
173 void V8DebuggerAgent::enable() | 185 void V8DebuggerAgent::enable() |
174 { | 186 { |
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1701 RefPtr<ExceptionDetails> exceptionDetails = ExceptionDetails::create().setTe
xt(toCoreStringWithUndefinedOrNullCheck(message->Get())); | 1713 RefPtr<ExceptionDetails> exceptionDetails = ExceptionDetails::create().setTe
xt(toCoreStringWithUndefinedOrNullCheck(message->Get())); |
1702 exceptionDetails->setLine(message->GetLineNumber()); | 1714 exceptionDetails->setLine(message->GetLineNumber()); |
1703 exceptionDetails->setColumn(message->GetStartColumn()); | 1715 exceptionDetails->setColumn(message->GetStartColumn()); |
1704 v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace(); | 1716 v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace(); |
1705 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount() > 0) | 1717 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount() > 0) |
1706 exceptionDetails->setStackTrace(createScriptCallStack(isolate, messageSt
ackTrace, messageStackTrace->GetFrameCount())->buildInspectorArray()); | 1718 exceptionDetails->setStackTrace(createScriptCallStack(isolate, messageSt
ackTrace, messageStackTrace->GetFrameCount())->buildInspectorArray()); |
1707 return exceptionDetails.release(); | 1719 return exceptionDetails.release(); |
1708 } | 1720 } |
1709 | 1721 |
1710 } // namespace blink | 1722 } // namespace blink |
OLD | NEW |