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 12 matching lines...) Expand all Loading... | |
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #include "config.h" | 30 #include "config.h" |
31 #include "core/inspector/InspectorDebuggerAgent.h" | 31 #include "core/inspector/InspectorDebuggerAgent.h" |
32 #include "core/inspector/JavaScriptCallFrame.h" | 32 #include "core/inspector/JavaScriptCallFrame.h" |
33 //#include "core/inspector/PromiseOfficer.h" | |
33 | 34 |
34 #include "bindings/v8/ScriptDebugServer.h" | 35 #include "bindings/v8/ScriptDebugServer.h" |
35 #include "bindings/v8/ScriptObject.h" | 36 #include "bindings/v8/ScriptObject.h" |
36 #include "bindings/v8/ScriptRegexp.h" | 37 #include "bindings/v8/ScriptRegexp.h" |
37 #include "bindings/v8/ScriptSourceCode.h" | 38 #include "bindings/v8/ScriptSourceCode.h" |
38 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
39 #include "core/fetch/Resource.h" | 40 #include "core/fetch/Resource.h" |
40 #include "core/inspector/ContentSearchUtils.h" | 41 #include "core/inspector/ContentSearchUtils.h" |
41 #include "core/inspector/InjectedScriptManager.h" | 42 #include "core/inspector/InjectedScriptManager.h" |
42 #include "core/inspector/InspectorPageAgent.h" | 43 #include "core/inspector/InspectorPageAgent.h" |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
774 } | 775 } |
775 | 776 |
776 void InspectorDebuggerAgent::didDeliverMutationRecords() | 777 void InspectorDebuggerAgent::didDeliverMutationRecords() |
777 { | 778 { |
778 if (m_asyncCallStackTracker.isEnabled()) | 779 if (m_asyncCallStackTracker.isEnabled()) |
779 m_asyncCallStackTracker.didFireAsyncCall(); | 780 m_asyncCallStackTracker.didFireAsyncCall(); |
780 } | 781 } |
781 | 782 |
782 void InspectorDebuggerAgent::didPostPromiseTask(ExecutionContext* context, Execu tionContextTask* task, bool isResolved) | 783 void InspectorDebuggerAgent::didPostPromiseTask(ExecutionContext* context, Execu tionContextTask* task, bool isResolved) |
783 { | 784 { |
785 printf("didPostPromiseTask\n"); | |
784 if (m_asyncCallStackTracker.isEnabled()) | 786 if (m_asyncCallStackTracker.isEnabled()) |
785 m_asyncCallStackTracker.didPostPromiseTask(context, task, isResolved, sc riptDebugServer().currentCallFrames()); | 787 m_asyncCallStackTracker.didPostPromiseTask(context, task, isResolved, sc riptDebugServer().currentCallFrames()); |
788 | |
789 // Very dummy | |
790 // PromiseOfficer* officer = new PromiseOfficer(); | |
791 // officer->doNothing(); | |
786 } | 792 } |
787 | 793 |
788 void InspectorDebuggerAgent::willPerformPromiseTask(ExecutionContext* context, E xecutionContextTask* task) | 794 void InspectorDebuggerAgent::willPerformPromiseTask(ExecutionContext* context, E xecutionContextTask* task) |
789 { | 795 { |
796 printf("willPerformPromiseTask\n"); | |
790 if (m_asyncCallStackTracker.isEnabled()) | 797 if (m_asyncCallStackTracker.isEnabled()) |
791 m_asyncCallStackTracker.willPerformPromiseTask(context, task); | 798 m_asyncCallStackTracker.willPerformPromiseTask(context, task); |
792 } | 799 } |
793 | 800 |
794 void InspectorDebuggerAgent::didPerformPromiseTask() | 801 void InspectorDebuggerAgent::didPerformPromiseTask() |
795 { | 802 { |
803 printf("didPerformPromiseTask\n"); | |
796 if (m_asyncCallStackTracker.isEnabled()) | 804 if (m_asyncCallStackTracker.isEnabled()) |
797 m_asyncCallStackTracker.didFireAsyncCall(); | 805 m_asyncCallStackTracker.didFireAsyncCall(); |
798 } | 806 } |
799 | 807 |
808 void InspectorDebuggerAgent::addPromise(ExecutionContext* context, v8::Handle<v8 ::Object> promise, v8::Handle<v8::Object> parentPromise, V8PromiseCustom::Promis eState state) { | |
809 m_promiseOfficer.addPromise(context, promise, parentPromise, state); | |
aandrey
2014/02/25 12:36:07
if enabled() check
Alexandra Mikhaylova
2014/02/26 14:08:41
Done.
| |
810 } | |
811 | |
812 void InspectorDebuggerAgent::updatePromiseParent(ExecutionContext* context, v8:: Handle<v8::Object> promise, v8::Handle<v8::Object> newParentPromise) { | |
813 m_promiseOfficer.updatePromiseParent(context, promise, newParentPromise); | |
814 } | |
815 | |
816 void InspectorDebuggerAgent::updatePromiseState(ExecutionContext* context, v8::H andle<v8::Object> promise, V8PromiseCustom::PromiseState newState) { | |
817 m_promiseOfficer.updatePromiseState(context, promise, newState); | |
818 } | |
819 | |
800 void InspectorDebuggerAgent::pause(ErrorString*) | 820 void InspectorDebuggerAgent::pause(ErrorString*) |
801 { | 821 { |
802 if (m_javaScriptPauseScheduled) | 822 if (m_javaScriptPauseScheduled) |
803 return; | 823 return; |
804 clearBreakDetails(); | 824 clearBreakDetails(); |
805 scriptDebugServer().setPauseOnNextStatement(true); | 825 scriptDebugServer().setPauseOnNextStatement(true); |
806 m_javaScriptPauseScheduled = true; | 826 m_javaScriptPauseScheduled = true; |
807 } | 827 } |
808 | 828 |
809 void InspectorDebuggerAgent::resume(ErrorString* errorString) | 829 void InspectorDebuggerAgent::resume(ErrorString* errorString) |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1261 { | 1281 { |
1262 m_scripts.clear(); | 1282 m_scripts.clear(); |
1263 m_breakpointIdToDebugServerBreakpointIds.clear(); | 1283 m_breakpointIdToDebugServerBreakpointIds.clear(); |
1264 m_asyncCallStackTracker.clear(); | 1284 m_asyncCallStackTracker.clear(); |
1265 if (m_frontend) | 1285 if (m_frontend) |
1266 m_frontend->globalObjectCleared(); | 1286 m_frontend->globalObjectCleared(); |
1267 } | 1287 } |
1268 | 1288 |
1269 } // namespace WebCore | 1289 } // namespace WebCore |
1270 | 1290 |
OLD | NEW |