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

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

Issue 404953003: DevTools: Async call stacks for window.postMessage() (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
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void didClearAllMutationRecords(ExecutionContext*, MutationObserver*); 101 void didClearAllMutationRecords(ExecutionContext*, MutationObserver*);
102 void willDeliverMutationRecords(ExecutionContext*, MutationObserver*); 102 void willDeliverMutationRecords(ExecutionContext*, MutationObserver*);
103 103
104 void didPostExecutionContextTask(ExecutionContext*, ExecutionContextTask*, c onst ScriptValue& callFrames); 104 void didPostExecutionContextTask(ExecutionContext*, ExecutionContextTask*, c onst ScriptValue& callFrames);
105 void didKillAllExecutionContextTasks(ExecutionContext*); 105 void didKillAllExecutionContextTasks(ExecutionContext*);
106 void willPerformExecutionContextTask(ExecutionContext*, ExecutionContextTask *); 106 void willPerformExecutionContextTask(ExecutionContext*, ExecutionContextTask *);
107 107
108 void didEnqueueV8AsyncTask(ExecutionContext*, const String& eventName, int i d, const ScriptValue& callFrames); 108 void didEnqueueV8AsyncTask(ExecutionContext*, const String& eventName, int i d, const ScriptValue& callFrames);
109 void willHandleV8AsyncTask(ExecutionContext*, const String& eventName, int i d); 109 void willHandleV8AsyncTask(ExecutionContext*, const String& eventName, int i d);
110 110
111 int traceAsyncOperationStarting(ExecutionContext*, const String& operationNa me, const ScriptValue& callFrames);
112 void traceAsyncOperationCompleted(ExecutionContext*, int operationId);
113 void traceAsyncCallbackStarting(ExecutionContext*, int operationId);
114
111 void didFireAsyncCall(); 115 void didFireAsyncCall();
112 void clear(); 116 void clear();
113 117
114 private: 118 private:
115 void willHandleXHREvent(XMLHttpRequest*, Event*); 119 void willHandleXHREvent(XMLHttpRequest*, Event*);
116 120
117 PassRefPtr<AsyncCallChain> createAsyncCallChain(const String& description, c onst ScriptValue& callFrames); 121 PassRefPtr<AsyncCallChain> createAsyncCallChain(const String& description, c onst ScriptValue& callFrames);
118 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtr<AsyncCallChain>) ; 122 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtr<AsyncCallChain>) ;
119 void clearCurrentAsyncCallChain(); 123 void clearCurrentAsyncCallChain();
120 static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned); 124 static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned);
121 bool validateCallFrames(const ScriptValue& callFrames); 125 bool validateCallFrames(const ScriptValue& callFrames);
122 126
123 class ExecutionContextData; 127 class ExecutionContextData;
124 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); 128 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*);
125 129
126 unsigned m_maxAsyncCallStackDepth; 130 unsigned m_maxAsyncCallStackDepth;
127 RefPtr<AsyncCallChain> m_currentAsyncCallChain; 131 RefPtr<AsyncCallChain> m_currentAsyncCallChain;
128 unsigned m_nestedAsyncCallCount; 132 unsigned m_nestedAsyncCallCount;
129 typedef HashMap<ExecutionContext*, ExecutionContextData*> ExecutionContextDa taMap; 133 typedef HashMap<ExecutionContext*, ExecutionContextData*> ExecutionContextDa taMap;
130 ExecutionContextDataMap m_executionContextDataMap; 134 ExecutionContextDataMap m_executionContextDataMap;
131 }; 135 };
132 136
133 } // namespace blink 137 } // namespace blink
134 138
135 #endif // !defined(AsyncCallStackTracker_h) 139 #endif // !defined(AsyncCallStackTracker_h)
OLDNEW
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698