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

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

Issue 383123009: DevTools: Support async call stacks for FileSystem API (part 1). (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 side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index 367ee470d56351c9fa08006a28934814eca24a1a..de67513368c3b874024b5275075bcf68270256df 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -842,6 +842,36 @@ void InspectorDebuggerAgent::didPerformExecutionContextTask()
m_asyncCallStackTracker.didFireAsyncCall();
}
+void InspectorDebuggerAgent::didEnqueueAsyncFileSystemCallback(ExecutionContext* context, AsyncFileSystemCallbacks* callback)
+{
+ if (m_asyncCallStackTracker.isEnabled())
+ m_asyncCallStackTracker.didEnqueueAsyncFileSystemCallback(context, callback, scriptDebugServer().currentCallFramesForAsyncStack());
+}
+
+void InspectorDebuggerAgent::didRemoveAsyncFileSystemCallback(ExecutionContext* context, AsyncFileSystemCallbacks* callback)
+{
+ if (m_asyncCallStackTracker.isEnabled())
+ m_asyncCallStackTracker.didRemoveAsyncFileSystemCallback(context, callback);
+}
+
+void InspectorDebuggerAgent::willHandleAsyncFileSystemCallback(ExecutionContext* context, AsyncFileSystemCallbacks* callback, bool willReschedule, bool hasMore)
+{
+ if (!m_asyncCallStackTracker.isEnabled())
+ return;
+ if (willReschedule)
+ m_asyncCallStackTracker.willRescheduleAsyncCallChain();
+ m_asyncCallStackTracker.willHandleAsyncFileSystemCallback(context, callback, hasMore);
+}
+
+void InspectorDebuggerAgent::didHandleAsyncFileSystemCallback(ExecutionContext* context, AsyncFileSystemCallbacks* callback, bool didReschedule)
+{
+ if (!m_asyncCallStackTracker.isEnabled())
+ return;
+ m_asyncCallStackTracker.didFireAsyncCall();
+ if (didReschedule)
+ m_asyncCallStackTracker.didRescheduleAsyncCallChain();
+}
+
void InspectorDebuggerAgent::didReceiveV8AsyncTaskEvent(ExecutionContext* context, const String& eventType, const String& eventName, int id)
{
if (!m_asyncCallStackTracker.isEnabled())

Powered by Google App Engine
This is Rietveld 408576698