Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h

Issue 2116563003: [DevTools] Report unhandled exceptions and promise rejections through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after ExceptionDetails change Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 std::unique_ptr<V8InspectorSession> connect(int contextGroupId, protocol::Fr ontendChannel*, V8InspectorSessionClient*, const String16* state) override; 124 std::unique_ptr<V8InspectorSession> connect(int contextGroupId, protocol::Fr ontendChannel*, V8InspectorSessionClient*, const String16* state) override;
125 void contextCreated(const V8ContextInfo&) override; 125 void contextCreated(const V8ContextInfo&) override;
126 void contextDestroyed(v8::Local<v8::Context>) override; 126 void contextDestroyed(v8::Local<v8::Context>) override;
127 void resetContextGroup(int contextGroupId) override; 127 void resetContextGroup(int contextGroupId) override;
128 void willExecuteScript(v8::Local<v8::Context>, int scriptId) override; 128 void willExecuteScript(v8::Local<v8::Context>, int scriptId) override;
129 void didExecuteScript(v8::Local<v8::Context>) override; 129 void didExecuteScript(v8::Local<v8::Context>) override;
130 void idleStarted() override; 130 void idleStarted() override;
131 void idleFinished() override; 131 void idleFinished() override;
132 bool 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) override; 132 bool 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) override;
133 void logToConsole(v8::Local<v8::Context>, const String16& message, v8::Local <v8::Value> arg1, v8::Local<v8::Value> arg2) override; 133 void logToConsole(v8::Local<v8::Context>, const String16& message, v8::Local <v8::Value> arg1, v8::Local<v8::Value> arg2) override;
134 unsigned promiseRejected(v8::Local<v8::Context>, const String16& errorMessag e, v8::Local<v8::Value> reason, const String16& url, unsigned lineNumber, unsign ed columnNumber, std::unique_ptr<V8StackTrace>, 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 void promiseRejectionRevoked(v8::Local<v8::Context>, unsigned promiseRejecti onId) override; 136 void promiseRejectionRevoked(v8::Local<v8::Context>, unsigned promiseRejecti onId) override;
136 void consoleMessagesCount(int contextGroupId, unsigned* total, unsigned* wit hArguments) override; 137 void consoleMessagesCount(int contextGroupId, unsigned* total, unsigned* wit hArguments) override;
137 std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>) ov erride; 138 std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>) ov erride;
138 std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) override; 139 std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) override;
139 void asyncTaskScheduled(const String16& taskName, void* task, bool recurring ) override; 140 void asyncTaskScheduled(const String16& taskName, void* task, bool recurring ) override;
140 void asyncTaskCanceled(void* task) override; 141 void asyncTaskCanceled(void* task) override;
141 void asyncTaskStarted(void* task) override; 142 void asyncTaskStarted(void* task) override;
142 void asyncTaskFinished(void* task) override; 143 void asyncTaskFinished(void* task) override;
143 void allAsyncTasksCanceled() override; 144 void allAsyncTasksCanceled() override;
144 void muteConsole() override { m_muteConsoleCount++; } 145 void muteConsole() override { m_muteConsoleCount++; }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 180
180 v8::Isolate* m_isolate; 181 v8::Isolate* m_isolate;
181 V8DebuggerClient* m_client; 182 V8DebuggerClient* m_client;
182 ContextsByGroupMap m_contexts; 183 ContextsByGroupMap m_contexts;
183 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>; 184 using SessionMap = protocol::HashMap<int, V8InspectorSessionImpl*>;
184 SessionMap m_sessions; 185 SessionMap m_sessions;
185 using ConsoleStorageMap = protocol::HashMap<int, std::unique_ptr<V8ConsoleMe ssageStorage>>; 186 using ConsoleStorageMap = protocol::HashMap<int, std::unique_ptr<V8ConsoleMe ssageStorage>>;
186 ConsoleStorageMap m_consoleStorageMap; 187 ConsoleStorageMap m_consoleStorageMap;
187 int m_capturingStackTracesCount; 188 int m_capturingStackTracesCount;
188 int m_muteConsoleCount; 189 int m_muteConsoleCount;
189 unsigned m_lastConsoleMessageId; 190 unsigned m_lastExceptionId;
190 int m_enabledAgentsCount; 191 int m_enabledAgentsCount;
191 bool m_breakpointsActivated; 192 bool m_breakpointsActivated;
192 v8::Global<v8::Object> m_debuggerScript; 193 v8::Global<v8::Object> m_debuggerScript;
193 v8::Global<v8::Context> m_debuggerContext; 194 v8::Global<v8::Context> m_debuggerContext;
194 v8::Local<v8::Object> m_executionState; 195 v8::Local<v8::Object> m_executionState;
195 v8::Local<v8::Context> m_pausedContext; 196 v8::Local<v8::Context> m_pausedContext;
196 bool m_runningNestedMessageLoop; 197 bool m_runningNestedMessageLoop;
197 v8::Global<v8::Context> m_regexContext; 198 v8::Global<v8::Context> m_regexContext;
198 199
199 using AsyncTaskToStackTrace = protocol::HashMap<void*, std::unique_ptr<V8Sta ckTraceImpl>>; 200 using AsyncTaskToStackTrace = protocol::HashMap<void*, std::unique_ptr<V8Sta ckTraceImpl>>;
200 AsyncTaskToStackTrace m_asyncTaskStacks; 201 AsyncTaskToStackTrace m_asyncTaskStacks;
201 protocol::HashSet<void*> m_recurringTasks; 202 protocol::HashSet<void*> m_recurringTasks;
202 int m_maxAsyncCallStackDepth; 203 int m_maxAsyncCallStackDepth;
203 std::vector<void*> m_currentTasks; 204 std::vector<void*> m_currentTasks;
204 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; 205 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks;
205 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; 206 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap;
206 }; 207 };
207 208
208 } // namespace blink 209 } // namespace blink
209 210
210 211
211 #endif // V8DebuggerImpl_h 212 #endif // V8DebuggerImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698