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

Side by Side Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 397843009: Revert of 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 if (m_asyncCallStackTracker.isEnabled()) 835 if (m_asyncCallStackTracker.isEnabled())
836 m_asyncCallStackTracker.willPerformExecutionContextTask(context, task); 836 m_asyncCallStackTracker.willPerformExecutionContextTask(context, task);
837 } 837 }
838 838
839 void InspectorDebuggerAgent::didPerformExecutionContextTask() 839 void InspectorDebuggerAgent::didPerformExecutionContextTask()
840 { 840 {
841 if (m_asyncCallStackTracker.isEnabled()) 841 if (m_asyncCallStackTracker.isEnabled())
842 m_asyncCallStackTracker.didFireAsyncCall(); 842 m_asyncCallStackTracker.didFireAsyncCall();
843 } 843 }
844 844
845 void InspectorDebuggerAgent::didEnqueueAsyncFileSystemCallback(ExecutionContext* context, AsyncFileSystemCallbacks* callback)
846 {
847 if (m_asyncCallStackTracker.isEnabled())
848 m_asyncCallStackTracker.didEnqueueAsyncFileSystemCallback(context, callb ack, scriptDebugServer().currentCallFramesForAsyncStack());
849 }
850
851 void InspectorDebuggerAgent::didRemoveAsyncFileSystemCallback(ExecutionContext* context, AsyncFileSystemCallbacks* callback)
852 {
853 if (m_asyncCallStackTracker.isEnabled())
854 m_asyncCallStackTracker.didRemoveAsyncFileSystemCallback(context, callba ck);
855 }
856
857 void InspectorDebuggerAgent::willHandleAsyncFileSystemCallback(ExecutionContext* context, AsyncFileSystemCallbacks* callback, bool willReschedule, bool hasMore)
858 {
859 if (!m_asyncCallStackTracker.isEnabled())
860 return;
861 if (willReschedule)
862 m_asyncCallStackTracker.willRescheduleAsyncCallChain();
863 m_asyncCallStackTracker.willHandleAsyncFileSystemCallback(context, callback, hasMore);
864 }
865
866 void InspectorDebuggerAgent::didHandleAsyncFileSystemCallback(ExecutionContext* context, AsyncFileSystemCallbacks* callback, bool didReschedule)
867 {
868 if (!m_asyncCallStackTracker.isEnabled())
869 return;
870 m_asyncCallStackTracker.didFireAsyncCall();
871 if (didReschedule)
872 m_asyncCallStackTracker.didRescheduleAsyncCallChain();
873 }
874
875 void InspectorDebuggerAgent::didReceiveV8AsyncTaskEvent(ExecutionContext* contex t, const String& eventType, const String& eventName, int id) 845 void InspectorDebuggerAgent::didReceiveV8AsyncTaskEvent(ExecutionContext* contex t, const String& eventType, const String& eventName, int id)
876 { 846 {
877 if (!m_asyncCallStackTracker.isEnabled()) 847 if (!m_asyncCallStackTracker.isEnabled())
878 return; 848 return;
879 if (eventType == v8AsyncTaskEventEnqueue) 849 if (eventType == v8AsyncTaskEventEnqueue)
880 m_asyncCallStackTracker.didEnqueueV8AsyncTask(context, eventName, id, sc riptDebugServer().currentCallFramesForAsyncStack()); 850 m_asyncCallStackTracker.didEnqueueV8AsyncTask(context, eventName, id, sc riptDebugServer().currentCallFramesForAsyncStack());
881 else if (eventType == v8AsyncTaskEventWillHandle) 851 else if (eventType == v8AsyncTaskEventWillHandle)
882 m_asyncCallStackTracker.willHandleV8AsyncTask(context, eventName, id); 852 m_asyncCallStackTracker.willHandleV8AsyncTask(context, eventName, id);
883 else if (eventType == v8AsyncTaskEventDidHandle) 853 else if (eventType == v8AsyncTaskEventDidHandle)
884 m_asyncCallStackTracker.didFireAsyncCall(); 854 m_asyncCallStackTracker.didFireAsyncCall();
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 { 1384 {
1415 m_scripts.clear(); 1385 m_scripts.clear();
1416 m_breakpointIdToDebugServerBreakpointIds.clear(); 1386 m_breakpointIdToDebugServerBreakpointIds.clear();
1417 m_asyncCallStackTracker.clear(); 1387 m_asyncCallStackTracker.clear();
1418 if (m_frontend) 1388 if (m_frontend)
1419 m_frontend->globalObjectCleared(); 1389 m_frontend->globalObjectCleared();
1420 } 1390 }
1421 1391
1422 } // namespace WebCore 1392 } // namespace WebCore
1423 1393
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.h ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698