| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 class V8RuntimeAgentImpl; | 57 class V8RuntimeAgentImpl; |
| 58 class V8StackTraceImpl; | 58 class V8StackTraceImpl; |
| 59 | 59 |
| 60 class V8DebuggerImpl : public V8Debugger { | 60 class V8DebuggerImpl : public V8Debugger { |
| 61 PROTOCOL_DISALLOW_COPY(V8DebuggerImpl); | 61 PROTOCOL_DISALLOW_COPY(V8DebuggerImpl); |
| 62 public: | 62 public: |
| 63 V8DebuggerImpl(v8::Isolate*, V8DebuggerClient*); | 63 V8DebuggerImpl(v8::Isolate*, V8DebuggerClient*); |
| 64 ~V8DebuggerImpl() override; | 64 ~V8DebuggerImpl() override; |
| 65 | 65 |
| 66 static int contextId(v8::Local<v8::Context>); | 66 static int contextId(v8::Local<v8::Context>); |
| 67 static int getGroupId(v8::Local<v8::Context>); |
| 67 | 68 |
| 68 bool enabled() const; | 69 bool enabled() const; |
| 69 | 70 |
| 70 String16 setBreakpoint(const String16& sourceID, const ScriptBreakpoint&, in
t* actualLineNumber, int* actualColumnNumber, bool interstatementLocation); | 71 String16 setBreakpoint(const String16& sourceID, const ScriptBreakpoint&, in
t* actualLineNumber, int* actualColumnNumber, bool interstatementLocation); |
| 71 void removeBreakpoint(const String16& breakpointId); | 72 void removeBreakpoint(const String16& breakpointId); |
| 72 void setBreakpointsActivated(bool); | 73 void setBreakpointsActivated(bool); |
| 73 bool breakpointsActivated() const { return m_breakpointsActivated; } | 74 bool breakpointsActivated() const { return m_breakpointsActivated; } |
| 74 | 75 |
| 75 enum PauseOnExceptionsState { | 76 enum PauseOnExceptionsState { |
| 76 DontPauseOnExceptions, | 77 DontPauseOnExceptions, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 123 |
| 123 // V8Debugger implementation | 124 // V8Debugger implementation |
| 124 std::unique_ptr<V8InspectorSession> connect(int contextGroupId, protocol::Fr
ontendChannel*, V8InspectorSessionClient*, const String16* state) override; | 125 std::unique_ptr<V8InspectorSession> connect(int contextGroupId, protocol::Fr
ontendChannel*, V8InspectorSessionClient*, const String16* state) override; |
| 125 void contextCreated(const V8ContextInfo&) override; | 126 void contextCreated(const V8ContextInfo&) override; |
| 126 void contextDestroyed(v8::Local<v8::Context>) override; | 127 void contextDestroyed(v8::Local<v8::Context>) override; |
| 127 void resetContextGroup(int contextGroupId) override; | 128 void resetContextGroup(int contextGroupId) override; |
| 128 void willExecuteScript(v8::Local<v8::Context>, int scriptId) override; | 129 void willExecuteScript(v8::Local<v8::Context>, int scriptId) override; |
| 129 void didExecuteScript(v8::Local<v8::Context>) override; | 130 void didExecuteScript(v8::Local<v8::Context>) override; |
| 130 void idleStarted() override; | 131 void idleStarted() override; |
| 131 void idleFinished() override; | 132 void idleFinished() override; |
| 132 void addConsoleMessage(int contextGroupId, MessageSource, MessageLevel, cons
t String16& message, const String16& url, unsigned lineNumber, unsigned columnNu
mber, std::unique_ptr<V8StackTrace>, int scriptId, const String16& requestIdenti
fier, const String16& workerId) override; | |
| 133 void logToConsole(v8::Local<v8::Context>, v8::Local<v8::Value> arg1, v8::Loc
al<v8::Value> arg2) override; | 133 void logToConsole(v8::Local<v8::Context>, v8::Local<v8::Value> arg1, v8::Loc
al<v8::Value> arg2) override; |
| 134 void exceptionThrown(int contextGroupId, const String16& errorMessage, const
String16& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8St
ackTrace>, int scriptId) override; | 134 void exceptionThrown(int contextGroupId, const String16& errorMessage, const
String16& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8St
ackTrace>, int scriptId) override; |
| 135 unsigned promiseRejected(v8::Local<v8::Context>, const String16& errorMessag
e, v8::Local<v8::Value> exception, const String16& url, unsigned lineNumber, uns
igned columnNumber, std::unique_ptr<V8StackTrace>, int scriptId) override; | 135 unsigned promiseRejected(v8::Local<v8::Context>, const String16& errorMessag
e, v8::Local<v8::Value> exception, const String16& url, unsigned lineNumber, uns
igned columnNumber, std::unique_ptr<V8StackTrace>, int scriptId) override; |
| 136 void promiseRejectionRevoked(v8::Local<v8::Context>, unsigned promiseRejecti
onId) override; | 136 void promiseRejectionRevoked(v8::Local<v8::Context>, unsigned promiseRejecti
onId) override; |
| 137 std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>) ov
erride; | 137 std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>) ov
erride; |
| 138 std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) override; | 138 std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) override; |
| 139 void asyncTaskScheduled(const String16& taskName, void* task, bool recurring
) override; | 139 void asyncTaskScheduled(const String16& taskName, void* task, bool recurring
) override; |
| 140 void asyncTaskCanceled(void* task) override; | 140 void asyncTaskCanceled(void* task) override; |
| 141 void asyncTaskStarted(void* task) override; | 141 void asyncTaskStarted(void* task) override; |
| 142 void asyncTaskFinished(void* task) override; | 142 void asyncTaskFinished(void* task) override; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 int m_maxAsyncCallStackDepth; | 200 int m_maxAsyncCallStackDepth; |
| 201 std::vector<void*> m_currentTasks; | 201 std::vector<void*> m_currentTasks; |
| 202 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; | 202 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; |
| 203 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; | 203 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 } // namespace blink | 206 } // namespace blink |
| 207 | 207 |
| 208 | 208 |
| 209 #endif // V8DebuggerImpl_h | 209 #endif // V8DebuggerImpl_h |
| OLD | NEW |