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

Unified Diff: src/inspector/v8-debugger.h

Issue 2579403002: [inspector] introduce limit for amount of stored async stacks (Closed)
Patch Set: addressed comments Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/test-interface.cc ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger.h
diff --git a/src/inspector/v8-debugger.h b/src/inspector/v8-debugger.h
index b1c044a06906f986bed52cfee54e12798f38809e..0caee41071f8d700c8999e7281ce93a207db2774 100644
--- a/src/inspector/v8-debugger.h
+++ b/src/inspector/v8-debugger.h
@@ -93,6 +93,8 @@ class V8Debugger {
WasmTranslation* wasmTranslation() { return &m_wasmTranslation; }
+ void setMaxAsyncTaskStacksForTest(int limit) { m_maxAsyncCallStacks = limit; }
+
private:
void compileDebuggerScript();
v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName,
@@ -150,6 +152,10 @@ class V8Debugger {
using AsyncTaskToStackTrace =
protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>;
AsyncTaskToStackTrace m_asyncTaskStacks;
+ int m_maxAsyncCallStacks;
+ std::map<int, void*> m_idToTask;
+ std::unordered_map<void*, int> m_taskToId;
+ int m_lastTaskId;
protocol::HashSet<void*> m_recurringTasks;
int m_maxAsyncCallStackDepth;
std::vector<void*> m_currentTasks;
« no previous file with comments | « src/inspector/test-interface.cc ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698