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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win compile Created 4 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/v8_inspector/V8DebuggerAgentImpl.h" 5 #include "platform/v8_inspector/V8DebuggerAgentImpl.h"
6 6
7 #include "platform/v8_inspector/InjectedScript.h" 7 #include "platform/v8_inspector/InjectedScript.h"
8 #include "platform/v8_inspector/InspectedContext.h" 8 #include "platform/v8_inspector/InspectedContext.h"
9 #include "platform/v8_inspector/JavaScriptCallFrame.h" 9 #include "platform/v8_inspector/JavaScriptCallFrame.h"
10 #include "platform/v8_inspector/RemoteObjectId.h" 10 #include "platform/v8_inspector/RemoteObjectId.h"
11 #include "platform/v8_inspector/ScriptBreakpoint.h" 11 #include "platform/v8_inspector/ScriptBreakpoint.h"
12 #include "platform/v8_inspector/SearchUtil.h"
13 #include "platform/v8_inspector/StringUtil.h"
12 #include "platform/v8_inspector/V8Debugger.h" 14 #include "platform/v8_inspector/V8Debugger.h"
13 #include "platform/v8_inspector/V8DebuggerScript.h" 15 #include "platform/v8_inspector/V8DebuggerScript.h"
14 #include "platform/v8_inspector/V8InspectorImpl.h" 16 #include "platform/v8_inspector/V8InspectorImpl.h"
15 #include "platform/v8_inspector/V8InspectorSessionImpl.h" 17 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
16 #include "platform/v8_inspector/V8Regex.h" 18 #include "platform/v8_inspector/V8Regex.h"
17 #include "platform/v8_inspector/V8RuntimeAgentImpl.h" 19 #include "platform/v8_inspector/V8RuntimeAgentImpl.h"
18 #include "platform/v8_inspector/V8StackTraceImpl.h" 20 #include "platform/v8_inspector/V8StackTraceImpl.h"
19 #include "platform/v8_inspector/V8StringUtil.h" 21 #include "platform/v8_inspector/protocol/Protocol.h"
20 #include "platform/v8_inspector/public/V8InspectorClient.h" 22 #include "platform/v8_inspector/public/V8InspectorClient.h"
21 23
22 #include <algorithm> 24 #include <algorithm>
23 25
24 using blink::protocol::Array; 26 namespace v8_inspector {
25 using blink::protocol::Maybe;
26 using blink::protocol::Debugger::BreakpointId;
27 using blink::protocol::Debugger::CallFrame;
28 using blink::protocol::Runtime::ExceptionDetails;
29 using blink::protocol::Runtime::ScriptId;
30 using blink::protocol::Runtime::StackTrace;
31 using blink::protocol::Runtime::RemoteObject;
32 27
33 namespace v8_inspector { 28 using protocol::Array;
29 using protocol::Maybe;
30 using protocol::Debugger::BreakpointId;
31 using protocol::Debugger::CallFrame;
32 using protocol::Runtime::ExceptionDetails;
33 using protocol::Runtime::ScriptId;
34 using protocol::Runtime::StackTrace;
35 using protocol::Runtime::RemoteObject;
34 36
35 namespace DebuggerAgentState { 37 namespace DebuggerAgentState {
36 static const char javaScriptBreakpoints[] = "javaScriptBreakopints"; 38 static const char javaScriptBreakpoints[] = "javaScriptBreakopints";
37 static const char pauseOnExceptionsState[] = "pauseOnExceptionsState"; 39 static const char pauseOnExceptionsState[] = "pauseOnExceptionsState";
38 static const char asyncCallStackDepth[] = "asyncCallStackDepth"; 40 static const char asyncCallStackDepth[] = "asyncCallStackDepth";
39 static const char blackboxPattern[] = "blackboxPattern"; 41 static const char blackboxPattern[] = "blackboxPattern";
40 static const char debuggerEnabled[] = "debuggerEnabled"; 42 static const char debuggerEnabled[] = "debuggerEnabled";
41 43
42 // Breakpoint properties. 44 // Breakpoint properties.
43 static const char url[] = "url"; 45 static const char url[] = "url";
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 875
874 void V8DebuggerAgentImpl::changeJavaScriptRecursionLevel(int step) 876 void V8DebuggerAgentImpl::changeJavaScriptRecursionLevel(int step)
875 { 877 {
876 if (m_javaScriptPauseScheduled && !m_skipAllPauses && !m_debugger->isPaused( )) { 878 if (m_javaScriptPauseScheduled && !m_skipAllPauses && !m_debugger->isPaused( )) {
877 // Do not ever loose user's pause request until we have actually paused. 879 // Do not ever loose user's pause request until we have actually paused.
878 m_debugger->setPauseOnNextStatement(true); 880 m_debugger->setPauseOnNextStatement(true);
879 } 881 }
880 if (m_scheduledDebuggerStep == StepOut) { 882 if (m_scheduledDebuggerStep == StepOut) {
881 m_recursionLevelForStepOut += step; 883 m_recursionLevelForStepOut += step;
882 if (!m_recursionLevelForStepOut) { 884 if (!m_recursionLevelForStepOut) {
883 // When StepOut crosses a task boundary (i.e. js -> blink_c++) from where it was requested, 885 // When StepOut crosses a task boundary (i.e. js -> c++) from where it was requested,
884 // switch stepping to step into a next JS task, as if we exited to a blackboxed framework. 886 // switch stepping to step into a next JS task, as if we exited to a blackboxed framework.
885 m_scheduledDebuggerStep = StepInto; 887 m_scheduledDebuggerStep = StepInto;
886 m_skipNextDebuggerStepOut = false; 888 m_skipNextDebuggerStepOut = false;
887 } 889 }
888 } 890 }
889 if (m_recursionLevelForStepFrame) { 891 if (m_recursionLevelForStepFrame) {
890 m_recursionLevelForStepFrame += step; 892 m_recursionLevelForStepFrame += step;
891 if (!m_recursionLevelForStepFrame) { 893 if (!m_recursionLevelForStepFrame) {
892 // We have walked through a blackboxed framework and got back to whe re we started. 894 // We have walked through a blackboxed framework and got back to whe re we started.
893 // If there was no stepping scheduled, we should cancel the stepping explicitly, 895 // If there was no stepping scheduled, we should cancel the stepping explicitly,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 { 979 {
978 v8::HandleScope handles(m_isolate); 980 v8::HandleScope handles(m_isolate);
979 String16 scriptSource = toProtocolString(script->source(m_isolate)); 981 String16 scriptSource = toProtocolString(script->source(m_isolate));
980 if (!success) 982 if (!success)
981 script->setSourceURL(findSourceURL(scriptSource, false)); 983 script->setSourceURL(findSourceURL(scriptSource, false));
982 if (!success) 984 if (!success)
983 script->setSourceMappingURL(findSourceMapURL(scriptSource, false)); 985 script->setSourceMappingURL(findSourceMapURL(scriptSource, false));
984 986
985 std::unique_ptr<protocol::DictionaryValue> executionContextAuxData; 987 std::unique_ptr<protocol::DictionaryValue> executionContextAuxData;
986 if (!script->executionContextAuxData().isEmpty()) 988 if (!script->executionContextAuxData().isEmpty())
987 executionContextAuxData = protocol::DictionaryValue::cast(parseJSON(scri pt->executionContextAuxData())); 989 executionContextAuxData = protocol::DictionaryValue::cast(protocol::pars eJSON(script->executionContextAuxData()));
988 bool isLiveEdit = script->isLiveEdit(); 990 bool isLiveEdit = script->isLiveEdit();
989 bool hasSourceURL = script->hasSourceURL(); 991 bool hasSourceURL = script->hasSourceURL();
990 String16 scriptId = script->scriptId(); 992 String16 scriptId = script->scriptId();
991 String16 scriptURL = script->sourceURL(); 993 String16 scriptURL = script->sourceURL();
992 994
993 const Maybe<String16>& sourceMapURLParam = script->sourceMappingURL(); 995 const Maybe<String16>& sourceMapURLParam = script->sourceMappingURL();
994 const Maybe<protocol::DictionaryValue>& executionContextAuxDataParam(std::mo ve(executionContextAuxData)); 996 const Maybe<protocol::DictionaryValue>& executionContextAuxDataParam(std::mo ve(executionContextAuxData));
995 const bool* isLiveEditParam = isLiveEdit ? &isLiveEdit : nullptr; 997 const bool* isLiveEditParam = isLiveEdit ? &isLiveEdit : nullptr;
996 const bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : nullptr; 998 const bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : nullptr;
997 if (success) 999 if (success)
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 { 1160 {
1159 if (!enabled()) 1161 if (!enabled())
1160 return; 1162 return;
1161 m_scheduledDebuggerStep = NoStep; 1163 m_scheduledDebuggerStep = NoStep;
1162 m_scripts.clear(); 1164 m_scripts.clear();
1163 m_blackboxedPositions.clear(); 1165 m_blackboxedPositions.clear();
1164 m_breakpointIdToDebuggerBreakpointIds.clear(); 1166 m_breakpointIdToDebuggerBreakpointIds.clear();
1165 } 1167 }
1166 1168
1167 } // namespace v8_inspector 1169 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698