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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 } | 664 } |
665 | 665 |
666 void InspectorDebuggerAgent::didInstallTimer(ExecutionContext* context, int time
rId, int timeout, bool singleShot) | 666 void InspectorDebuggerAgent::didInstallTimer(ExecutionContext* context, int time
rId, int timeout, bool singleShot) |
667 { | 667 { |
668 if (m_asyncCallStackTracker.isEnabled()) | 668 if (m_asyncCallStackTracker.isEnabled()) |
669 m_asyncCallStackTracker.didInstallTimer(context, timerId, singleShot, sc
riptDebugServer().currentCallFrames()); | 669 m_asyncCallStackTracker.didInstallTimer(context, timerId, singleShot, sc
riptDebugServer().currentCallFrames()); |
670 } | 670 } |
671 | 671 |
672 void InspectorDebuggerAgent::didRemoveTimer(ExecutionContext* context, int timer
Id) | 672 void InspectorDebuggerAgent::didRemoveTimer(ExecutionContext* context, int timer
Id) |
673 { | 673 { |
674 m_asyncCallStackTracker.didRemoveTimer(context, timerId); | 674 if (m_asyncCallStackTracker.isEnabled()) |
| 675 m_asyncCallStackTracker.didRemoveTimer(context, timerId); |
675 } | 676 } |
676 | 677 |
677 bool InspectorDebuggerAgent::willFireTimer(ExecutionContext* context, int timerI
d) | 678 bool InspectorDebuggerAgent::willFireTimer(ExecutionContext* context, int timerI
d) |
678 { | 679 { |
679 m_asyncCallStackTracker.willFireTimer(context, timerId); | 680 if (m_asyncCallStackTracker.isEnabled()) |
| 681 m_asyncCallStackTracker.willFireTimer(context, timerId); |
680 return true; | 682 return true; |
681 } | 683 } |
682 | 684 |
683 void InspectorDebuggerAgent::didFireTimer() | 685 void InspectorDebuggerAgent::didFireTimer() |
684 { | 686 { |
685 m_asyncCallStackTracker.didFireAsyncCall(); | 687 if (m_asyncCallStackTracker.isEnabled()) |
| 688 m_asyncCallStackTracker.didFireAsyncCall(); |
686 cancelPauseOnNextStatement(); | 689 cancelPauseOnNextStatement(); |
687 } | 690 } |
688 | 691 |
689 void InspectorDebuggerAgent::didRequestAnimationFrame(Document* document, int ca
llbackId) | 692 void InspectorDebuggerAgent::didRequestAnimationFrame(Document* document, int ca
llbackId) |
690 { | 693 { |
691 if (m_asyncCallStackTracker.isEnabled()) | 694 if (m_asyncCallStackTracker.isEnabled()) |
692 m_asyncCallStackTracker.didRequestAnimationFrame(document, callbackId, s
criptDebugServer().currentCallFrames()); | 695 m_asyncCallStackTracker.didRequestAnimationFrame(document, callbackId, s
criptDebugServer().currentCallFrames()); |
693 } | 696 } |
694 | 697 |
695 void InspectorDebuggerAgent::didCancelAnimationFrame(Document* document, int cal
lbackId) | 698 void InspectorDebuggerAgent::didCancelAnimationFrame(Document* document, int cal
lbackId) |
696 { | 699 { |
697 m_asyncCallStackTracker.didCancelAnimationFrame(document, callbackId); | 700 if (m_asyncCallStackTracker.isEnabled()) |
| 701 m_asyncCallStackTracker.didCancelAnimationFrame(document, callbackId); |
698 } | 702 } |
699 | 703 |
700 bool InspectorDebuggerAgent::willFireAnimationFrame(Document* document, int call
backId) | 704 bool InspectorDebuggerAgent::willFireAnimationFrame(Document* document, int call
backId) |
701 { | 705 { |
702 m_asyncCallStackTracker.willFireAnimationFrame(document, callbackId); | 706 if (m_asyncCallStackTracker.isEnabled()) |
| 707 m_asyncCallStackTracker.willFireAnimationFrame(document, callbackId); |
703 return true; | 708 return true; |
704 } | 709 } |
705 | 710 |
706 void InspectorDebuggerAgent::didFireAnimationFrame() | 711 void InspectorDebuggerAgent::didFireAnimationFrame() |
707 { | 712 { |
708 m_asyncCallStackTracker.didFireAsyncCall(); | 713 if (m_asyncCallStackTracker.isEnabled()) |
| 714 m_asyncCallStackTracker.didFireAsyncCall(); |
| 715 } |
| 716 |
| 717 void InspectorDebuggerAgent::didAddEventListener(EventTarget* eventTarget, const
AtomicString& eventType, EventListener* listener, bool useCapture) |
| 718 { |
| 719 if (m_asyncCallStackTracker.isEnabled()) |
| 720 m_asyncCallStackTracker.didAddEventListener(eventTarget, eventType, list
ener, useCapture, scriptDebugServer().currentCallFrames()); |
| 721 } |
| 722 |
| 723 void InspectorDebuggerAgent::didRemoveEventListener(EventTarget* eventTarget, co
nst AtomicString& eventType, EventListener* listener, bool useCapture) |
| 724 { |
| 725 if (m_asyncCallStackTracker.isEnabled()) |
| 726 m_asyncCallStackTracker.didRemoveEventListener(eventTarget, eventType, l
istener, useCapture); |
| 727 } |
| 728 |
| 729 void InspectorDebuggerAgent::didRemoveAllEventListeners(EventTarget* eventTarget
) |
| 730 { |
| 731 if (m_asyncCallStackTracker.isEnabled()) |
| 732 m_asyncCallStackTracker.didRemoveAllEventListeners(eventTarget); |
| 733 } |
| 734 |
| 735 void InspectorDebuggerAgent::willHandleEvent(EventTarget* eventTarget, const Ato
micString& eventType, EventListener* listener, bool useCapture) |
| 736 { |
| 737 if (m_asyncCallStackTracker.isEnabled()) |
| 738 m_asyncCallStackTracker.willHandleEvent(eventTarget, eventType, listener
, useCapture); |
709 } | 739 } |
710 | 740 |
711 void InspectorDebuggerAgent::didHandleEvent() | 741 void InspectorDebuggerAgent::didHandleEvent() |
712 { | 742 { |
| 743 if (m_asyncCallStackTracker.isEnabled()) |
| 744 m_asyncCallStackTracker.didFireAsyncCall(); |
713 cancelPauseOnNextStatement(); | 745 cancelPauseOnNextStatement(); |
714 } | 746 } |
715 | 747 |
716 void InspectorDebuggerAgent::pause(ErrorString*) | 748 void InspectorDebuggerAgent::pause(ErrorString*) |
717 { | 749 { |
718 if (m_javaScriptPauseScheduled) | 750 if (m_javaScriptPauseScheduled) |
719 return; | 751 return; |
720 clearBreakDetails(); | 752 clearBreakDetails(); |
721 scriptDebugServer().setPauseOnNextStatement(true); | 753 scriptDebugServer().setPauseOnNextStatement(true); |
722 m_javaScriptPauseScheduled = true; | 754 m_javaScriptPauseScheduled = true; |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 { | 1198 { |
1167 m_scripts.clear(); | 1199 m_scripts.clear(); |
1168 m_breakpointIdToDebugServerBreakpointIds.clear(); | 1200 m_breakpointIdToDebugServerBreakpointIds.clear(); |
1169 m_asyncCallStackTracker.clear(); | 1201 m_asyncCallStackTracker.clear(); |
1170 if (m_frontend) | 1202 if (m_frontend) |
1171 m_frontend->globalObjectCleared(); | 1203 m_frontend->globalObjectCleared(); |
1172 } | 1204 } |
1173 | 1205 |
1174 } // namespace WebCore | 1206 } // namespace WebCore |
1175 | 1207 |
OLD | NEW |