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

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: rebased 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 void didEnqueueMutationRecord(ExecutionContext*, MutationObserver*, const Sc riptValue& callFrames); 97 void didEnqueueMutationRecord(ExecutionContext*, MutationObserver*, const Sc riptValue& callFrames);
98 bool hasEnqueuedMutationRecord(ExecutionContext*, MutationObserver*); 98 bool hasEnqueuedMutationRecord(ExecutionContext*, MutationObserver*);
99 void didClearAllMutationRecords(ExecutionContext*, MutationObserver*); 99 void didClearAllMutationRecords(ExecutionContext*, MutationObserver*);
100 void willDeliverMutationRecords(ExecutionContext*, MutationObserver*); 100 void willDeliverMutationRecords(ExecutionContext*, MutationObserver*);
101 101
102 void didPostExecutionContextTask(ExecutionContext*, ExecutionContextTask*, c onst ScriptValue& callFrames); 102 void didPostExecutionContextTask(ExecutionContext*, ExecutionContextTask*, c onst ScriptValue& callFrames);
103 void didKillAllExecutionContextTasks(ExecutionContext*); 103 void didKillAllExecutionContextTasks(ExecutionContext*);
104 void willPerformExecutionContextTask(ExecutionContext*, ExecutionContextTask *); 104 void willPerformExecutionContextTask(ExecutionContext*, ExecutionContextTask *);
105 105
106 void didEnqueueV8AsyncTask(ExecutionContext*, const String& eventName, int i d, const ScriptValue& callFrames);
107 void willHandleV8AsyncTask(ExecutionContext*, const String& eventName, int i d);
108
106 void didFireAsyncCall(); 109 void didFireAsyncCall();
107 void clear(); 110 void clear();
108 111
109 private: 112 private:
110 void willHandleXHREvent(XMLHttpRequest*, EventTarget*, Event*); 113 void willHandleXHREvent(XMLHttpRequest*, EventTarget*, Event*);
111 114
112 PassRefPtr<AsyncCallChain> createAsyncCallChain(const String& description, c onst ScriptValue& callFrames); 115 PassRefPtr<AsyncCallChain> createAsyncCallChain(const String& description, c onst ScriptValue& callFrames);
113 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtr<AsyncCallChain>) ; 116 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtr<AsyncCallChain>) ;
114 void clearCurrentAsyncCallChain(); 117 void clearCurrentAsyncCallChain();
115 static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned); 118 static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned);
116 static bool validateCallFrames(const ScriptValue& callFrames); 119 bool validateCallFrames(const ScriptValue& callFrames);
117 120
118 class ExecutionContextData; 121 class ExecutionContextData;
119 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); 122 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*);
120 123
121 unsigned m_maxAsyncCallStackDepth; 124 unsigned m_maxAsyncCallStackDepth;
122 RefPtr<AsyncCallChain> m_currentAsyncCallChain; 125 RefPtr<AsyncCallChain> m_currentAsyncCallChain;
123 unsigned m_nestedAsyncCallCount; 126 unsigned m_nestedAsyncCallCount;
124 typedef HashMap<ExecutionContext*, ExecutionContextData*> ExecutionContextDa taMap; 127 typedef HashMap<ExecutionContext*, ExecutionContextData*> ExecutionContextDa taMap;
125 ExecutionContextDataMap m_executionContextDataMap; 128 ExecutionContextDataMap m_executionContextDataMap;
126 }; 129 };
127 130
128 } // namespace WebCore 131 } // namespace WebCore
129 132
130 #endif // !defined(AsyncCallStackTracker_h) 133 #endif // !defined(AsyncCallStackTracker_h)
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptDebugServer.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698