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

Side by Side Diff: Source/core/inspector/AsyncCallStackTracker.h

Issue 374903002: DevTools: Async call stacks for Promises and Object.observe. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void didEnqueueEvent(EventTarget*, Event*, const ScriptValue& callFrames); 91 void didEnqueueEvent(EventTarget*, Event*, const ScriptValue& callFrames);
92 void didRemoveEvent(EventTarget*, Event*); 92 void didRemoveEvent(EventTarget*, Event*);
93 void willHandleEvent(EventTarget*, Event*, EventListener*, bool useCapture); 93 void willHandleEvent(EventTarget*, Event*, EventListener*, bool useCapture);
94 void willLoadXHR(XMLHttpRequest*, const ScriptValue& callFrames); 94 void willLoadXHR(XMLHttpRequest*, const ScriptValue& callFrames);
95 95
96 void didEnqueueMutationRecord(ExecutionContext*, MutationObserver*, const Sc riptValue& callFrames); 96 void didEnqueueMutationRecord(ExecutionContext*, MutationObserver*, const Sc riptValue& callFrames);
97 bool hasEnqueuedMutationRecord(ExecutionContext*, MutationObserver*); 97 bool hasEnqueuedMutationRecord(ExecutionContext*, MutationObserver*);
98 void didClearAllMutationRecords(ExecutionContext*, MutationObserver*); 98 void didClearAllMutationRecords(ExecutionContext*, MutationObserver*);
99 void willDeliverMutationRecords(ExecutionContext*, MutationObserver*); 99 void willDeliverMutationRecords(ExecutionContext*, MutationObserver*);
100 100
101 void didEnqueueV8AsyncTask(ExecutionContext*, const String& eventName, int i d, const ScriptValue& callFrames);
102 void willHandleV8AsyncTask(ExecutionContext*, const String& eventName, int i d);
103
101 void didFireAsyncCall(); 104 void didFireAsyncCall();
102 void clear(); 105 void clear();
103 106
104 private: 107 private:
105 void willHandleXHREvent(XMLHttpRequest*, EventTarget*, Event*); 108 void willHandleXHREvent(XMLHttpRequest*, EventTarget*, Event*);
106 109
107 PassRefPtr<AsyncCallChain> createAsyncCallChain(const String& description, c onst ScriptValue& callFrames); 110 PassRefPtr<AsyncCallChain> createAsyncCallChain(const String& description, c onst ScriptValue& callFrames);
108 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtr<AsyncCallChain>) ; 111 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtr<AsyncCallChain>) ;
109 void clearCurrentAsyncCallChain(); 112 void clearCurrentAsyncCallChain();
110 static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned); 113 static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned);
111 static bool validateCallFrames(const ScriptValue& callFrames); 114 bool validateCallFrames(const ScriptValue& callFrames);
112 115
113 class ExecutionContextData; 116 class ExecutionContextData;
114 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); 117 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*);
115 118
116 unsigned m_maxAsyncCallStackDepth; 119 unsigned m_maxAsyncCallStackDepth;
117 RefPtr<AsyncCallChain> m_currentAsyncCallChain; 120 RefPtr<AsyncCallChain> m_currentAsyncCallChain;
118 unsigned m_nestedAsyncCallCount; 121 unsigned m_nestedAsyncCallCount;
119 typedef HashMap<ExecutionContext*, ExecutionContextData*> ExecutionContextDa taMap; 122 typedef HashMap<ExecutionContext*, ExecutionContextData*> ExecutionContextDa taMap;
120 ExecutionContextDataMap m_executionContextDataMap; 123 ExecutionContextDataMap m_executionContextDataMap;
121 }; 124 };
122 125
123 } // namespace WebCore 126 } // namespace WebCore
124 127
125 #endif // !defined(AsyncCallStackTracker_h) 128 #endif // !defined(AsyncCallStackTracker_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698