Chromium Code Reviews| 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) 2010-2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010-2011 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 701 { | 701 { |
| 702 m_asyncCallStackTracker.willFireAnimationFrame(document, callbackId); | 702 m_asyncCallStackTracker.willFireAnimationFrame(document, callbackId); |
| 703 return true; | 703 return true; |
| 704 } | 704 } |
| 705 | 705 |
| 706 void InspectorDebuggerAgent::didFireAnimationFrame() | 706 void InspectorDebuggerAgent::didFireAnimationFrame() |
| 707 { | 707 { |
| 708 m_asyncCallStackTracker.didFireAsyncCall(); | 708 m_asyncCallStackTracker.didFireAsyncCall(); |
| 709 } | 709 } |
| 710 | 710 |
| 711 void InspectorDebuggerAgent::didAddEventListener(EventTarget* eventTarget, const AtomicString& eventType, EventListener* listener, bool useCapture) | |
| 712 { | |
| 713 if (m_asyncCallStackTracker.isEnabled()) | |
|
yurys
2013/12/16 15:03:55
We should be able to avoid this check by setting d
aandrey
2013/12/16 15:20:22
The Debugger agent can function both w/ and w/o as
| |
| 714 m_asyncCallStackTracker.didAddEventListener(eventTarget, eventType, list ener, useCapture, scriptDebugServer().currentCallFrames()); | |
| 715 } | |
| 716 | |
| 717 void InspectorDebuggerAgent::didRemoveEventListener(EventTarget* eventTarget, co nst AtomicString& eventType, EventListener* listener, bool useCapture) | |
| 718 { | |
| 719 m_asyncCallStackTracker.didRemoveEventListener(eventTarget, eventType, liste ner, useCapture); | |
| 720 } | |
| 721 | |
| 722 void InspectorDebuggerAgent::didRemoveAllEventListeners(EventTarget* eventTarget ) | |
| 723 { | |
| 724 m_asyncCallStackTracker.didRemoveAllEventListeners(eventTarget); | |
| 725 } | |
| 726 | |
| 727 void InspectorDebuggerAgent::willHandleEvent(EventTarget* eventTarget, const Ato micString& eventType, EventListener* listener, bool useCapture) | |
| 728 { | |
| 729 m_asyncCallStackTracker.willHandleEvent(eventTarget, eventType, listener, us eCapture); | |
| 730 } | |
| 731 | |
| 711 void InspectorDebuggerAgent::didHandleEvent() | 732 void InspectorDebuggerAgent::didHandleEvent() |
| 712 { | 733 { |
| 734 m_asyncCallStackTracker.didFireAsyncCall(); | |
| 713 cancelPauseOnNextStatement(); | 735 cancelPauseOnNextStatement(); |
| 714 } | 736 } |
| 715 | 737 |
| 716 void InspectorDebuggerAgent::pause(ErrorString*) | 738 void InspectorDebuggerAgent::pause(ErrorString*) |
| 717 { | 739 { |
| 718 if (m_javaScriptPauseScheduled) | 740 if (m_javaScriptPauseScheduled) |
| 719 return; | 741 return; |
| 720 clearBreakDetails(); | 742 clearBreakDetails(); |
| 721 scriptDebugServer().setPauseOnNextStatement(true); | 743 scriptDebugServer().setPauseOnNextStatement(true); |
| 722 m_javaScriptPauseScheduled = true; | 744 m_javaScriptPauseScheduled = true; |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1166 { | 1188 { |
| 1167 m_scripts.clear(); | 1189 m_scripts.clear(); |
| 1168 m_breakpointIdToDebugServerBreakpointIds.clear(); | 1190 m_breakpointIdToDebugServerBreakpointIds.clear(); |
| 1169 m_asyncCallStackTracker.clear(); | 1191 m_asyncCallStackTracker.clear(); |
| 1170 if (m_frontend) | 1192 if (m_frontend) |
| 1171 m_frontend->globalObjectCleared(); | 1193 m_frontend->globalObjectCleared(); |
| 1172 } | 1194 } |
| 1173 | 1195 |
| 1174 } // namespace WebCore | 1196 } // namespace WebCore |
| 1175 | 1197 |
| OLD | NEW |