OLD | NEW |
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 Loading... |
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 |
845 void InspectorDebuggerAgent::didReceiveV8AsyncTaskEvent(ExecutionContext* contex
t, const String& eventType, const String& eventName, int id) | 875 void InspectorDebuggerAgent::didReceiveV8AsyncTaskEvent(ExecutionContext* contex
t, const String& eventType, const String& eventName, int id) |
846 { | 876 { |
847 if (!m_asyncCallStackTracker.isEnabled()) | 877 if (!m_asyncCallStackTracker.isEnabled()) |
848 return; | 878 return; |
849 if (eventType == v8AsyncTaskEventEnqueue) | 879 if (eventType == v8AsyncTaskEventEnqueue) |
850 m_asyncCallStackTracker.didEnqueueV8AsyncTask(context, eventName, id, sc
riptDebugServer().currentCallFramesForAsyncStack()); | 880 m_asyncCallStackTracker.didEnqueueV8AsyncTask(context, eventName, id, sc
riptDebugServer().currentCallFramesForAsyncStack()); |
851 else if (eventType == v8AsyncTaskEventWillHandle) | 881 else if (eventType == v8AsyncTaskEventWillHandle) |
852 m_asyncCallStackTracker.willHandleV8AsyncTask(context, eventName, id); | 882 m_asyncCallStackTracker.willHandleV8AsyncTask(context, eventName, id); |
853 else if (eventType == v8AsyncTaskEventDidHandle) | 883 else if (eventType == v8AsyncTaskEventDidHandle) |
854 m_asyncCallStackTracker.didFireAsyncCall(); | 884 m_asyncCallStackTracker.didFireAsyncCall(); |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 { | 1414 { |
1385 m_scripts.clear(); | 1415 m_scripts.clear(); |
1386 m_breakpointIdToDebugServerBreakpointIds.clear(); | 1416 m_breakpointIdToDebugServerBreakpointIds.clear(); |
1387 m_asyncCallStackTracker.clear(); | 1417 m_asyncCallStackTracker.clear(); |
1388 if (m_frontend) | 1418 if (m_frontend) |
1389 m_frontend->globalObjectCleared(); | 1419 m_frontend->globalObjectCleared(); |
1390 } | 1420 } |
1391 | 1421 |
1392 } // namespace WebCore | 1422 } // namespace WebCore |
1393 | 1423 |
OLD | NEW |