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

Unified Diff: Source/core/inspector/InspectorDebuggerAgent.h

Issue 855383002: DevTools: use async operation id instead of AsyncCallChain (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorDebuggerAgent.h
diff --git a/Source/core/inspector/InspectorDebuggerAgent.h b/Source/core/inspector/InspectorDebuggerAgent.h
index 9ae2efbd68d0edf7bb5c4693dbcadfcf8ff5c80d..351ef1b288d8ec14207a72b0e17812fa7d3dfa30 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.h
+++ b/Source/core/inspector/InspectorDebuggerAgent.h
@@ -49,6 +49,7 @@
namespace blink {
class AsyncCallChain;
+class AsyncCallStack;
class ConsoleMessage;
class InjectedScript;
class InjectedScriptManager;
@@ -172,11 +173,11 @@ public:
// Async call stacks implementation
PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> currentAsyncStackTraceForConsole();
- PassRefPtrWillBeRawPtr<AsyncCallChain> traceAsyncOperationStarting(const String& description);
- void traceAsyncCallbackStarting(v8::Isolate*, PassRefPtrWillBeRawPtr<AsyncCallChain>);
+ int traceAsyncOperationStarting(const String& description);
+ void traceAsyncCallbackStarting(v8::Isolate*, int operationId);
const AsyncCallChain* currentAsyncCallChain() const;
void traceAsyncCallbackCompleted();
- void traceAsyncOperationCompleted(AsyncCallChain*);
+ void traceAsyncOperationCompleted(int operationId);
bool trackingAsyncCalls() const { return m_maxAsyncCallStackDepth; }
class AsyncCallTrackingListener : public WillBeGarbageCollectedMixin {
@@ -219,6 +220,7 @@ private:
PassRefPtr<TypeBuilder::Debugger::StackTrace> currentAsyncStackTrace();
void resetAsyncCallTracker();
+ int createAsyncCallChain(PassRefPtrWillBeRawPtr<AsyncCallStack>);
void didCreateAsyncCallChain(AsyncCallChain*);
void changeJavaScriptRecursionLevel(int step);
@@ -286,6 +288,9 @@ private:
OwnPtrWillBeMember<V8AsyncCallTracker> m_v8AsyncCallTracker;
OwnPtrWillBeMember<PromiseTracker> m_promiseTracker;
+ using AsyncOperationIdToAsyncCallChain = WillBeHeapHashMap<int, RefPtrWillBeMember<AsyncCallChain>>;
+ AsyncOperationIdToAsyncCallChain m_asyncOperations;
+ int m_nextAsyncOperationId;
WillBeHeapHashSet<RefPtrWillBeMember<AsyncCallChain> > m_asyncOperationsForStepInto;
unsigned m_maxAsyncCallStackDepth;
RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain;

Powered by Google App Engine
This is Rietveld 408576698