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

Side by Side Diff: src/inspector/v8-debugger.h

Issue 2842733002: [inspector] V8DebuggerAgent should not resume break in different group (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | src/inspector/v8-debugger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project 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 #ifndef V8_INSPECTOR_V8DEBUGGER_H_ 5 #ifndef V8_INSPECTOR_V8DEBUGGER_H_
6 #define V8_INSPECTOR_V8DEBUGGER_H_ 6 #define V8_INSPECTOR_V8DEBUGGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 String16 setBreakpoint(const ScriptBreakpoint&, int* actualLineNumber, 44 String16 setBreakpoint(const ScriptBreakpoint&, int* actualLineNumber,
45 int* actualColumnNumber); 45 int* actualColumnNumber);
46 void removeBreakpoint(const String16& breakpointId); 46 void removeBreakpoint(const String16& breakpointId);
47 void setBreakpointsActivated(bool); 47 void setBreakpointsActivated(bool);
48 bool breakpointsActivated() const { return m_breakpointsActivated; } 48 bool breakpointsActivated() const { return m_breakpointsActivated; }
49 49
50 v8::debug::ExceptionBreakState getPauseOnExceptionsState(); 50 v8::debug::ExceptionBreakState getPauseOnExceptionsState();
51 void setPauseOnExceptionsState(v8::debug::ExceptionBreakState); 51 void setPauseOnExceptionsState(v8::debug::ExceptionBreakState);
52 bool canBreakProgram(); 52 bool canBreakProgram();
53 void breakProgram(); 53 void breakProgram();
54 void continueProgram(); 54 void continueProgram(int targetContextGroupId);
55 55
56 void setPauseOnNextStatement(bool, int targetContextGroupId); 56 void setPauseOnNextStatement(bool, int targetContextGroupId);
57 void stepIntoStatement(int targetContextGroupId); 57 void stepIntoStatement(int targetContextGroupId);
58 void stepOverStatement(int targetContextGroupId); 58 void stepOverStatement(int targetContextGroupId);
59 void stepOutOfFunction(int targetContextGroupId); 59 void stepOutOfFunction(int targetContextGroupId);
60 void scheduleStepIntoAsync( 60 void scheduleStepIntoAsync(
61 std::unique_ptr<ScheduleStepIntoAsyncCallback> callback, 61 std::unique_ptr<ScheduleStepIntoAsyncCallback> callback,
62 int targetContextGroupId); 62 int targetContextGroupId);
63 63
64 Response setScriptSource( 64 Response setScriptSource(
65 const String16& sourceID, v8::Local<v8::String> newSource, bool dryRun, 65 const String16& sourceID, v8::Local<v8::String> newSource, bool dryRun,
66 protocol::Maybe<protocol::Runtime::ExceptionDetails>*, 66 protocol::Maybe<protocol::Runtime::ExceptionDetails>*,
67 JavaScriptCallFrames* newCallFrames, protocol::Maybe<bool>* stackChanged, 67 JavaScriptCallFrames* newCallFrames, protocol::Maybe<bool>* stackChanged,
68 bool* compileError); 68 bool* compileError);
69 JavaScriptCallFrames currentCallFrames(int limit = 0); 69 JavaScriptCallFrames currentCallFrames(int limit = 0);
70 70
71 // Each script inherits debug data from v8::Context where it has been 71 // Each script inherits debug data from v8::Context where it has been
72 // compiled. 72 // compiled.
73 // Only scripts whose debug data matches |contextGroupId| will be reported. 73 // Only scripts whose debug data matches |contextGroupId| will be reported.
74 // Passing 0 will result in reporting all scripts. 74 // Passing 0 will result in reporting all scripts.
75 void getCompiledScripts(int contextGroupId, 75 void getCompiledScripts(int contextGroupId,
76 std::vector<std::unique_ptr<V8DebuggerScript>>&); 76 std::vector<std::unique_ptr<V8DebuggerScript>>&);
77 void enable(); 77 void enable();
78 void disable(); 78 void disable();
79 79
80 bool isPaused() const { return m_runningNestedMessageLoop; } 80 bool isPaused() const { return m_pausedContextGroupId; }
81 v8::Local<v8::Context> pausedContext() { return m_pausedContext; } 81 v8::Local<v8::Context> pausedContext() { return m_pausedContext; }
82 82
83 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; } 83 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; }
84 void setAsyncCallStackDepth(V8DebuggerAgentImpl*, int); 84 void setAsyncCallStackDepth(V8DebuggerAgentImpl*, int);
85 85
86 std::shared_ptr<AsyncStackTrace> currentAsyncParent(); 86 std::shared_ptr<AsyncStackTrace> currentAsyncParent();
87 std::shared_ptr<AsyncStackTrace> currentAsyncCreation(); 87 std::shared_ptr<AsyncStackTrace> currentAsyncCreation();
88 88
89 std::shared_ptr<StackFrame> symbolize(v8::Local<v8::StackFrame> v8Frame); 89 std::shared_ptr<StackFrame> symbolize(v8::Local<v8::StackFrame> v8Frame);
90 90
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 int currentContextGroupId(); 173 int currentContextGroupId();
174 174
175 v8::Isolate* m_isolate; 175 v8::Isolate* m_isolate;
176 V8InspectorImpl* m_inspector; 176 V8InspectorImpl* m_inspector;
177 int m_enableCount; 177 int m_enableCount;
178 bool m_breakpointsActivated; 178 bool m_breakpointsActivated;
179 v8::Global<v8::Object> m_debuggerScript; 179 v8::Global<v8::Object> m_debuggerScript;
180 v8::Global<v8::Context> m_debuggerContext; 180 v8::Global<v8::Context> m_debuggerContext;
181 v8::Local<v8::Object> m_executionState; 181 v8::Local<v8::Object> m_executionState;
182 v8::Local<v8::Context> m_pausedContext; 182 v8::Local<v8::Context> m_pausedContext;
183 bool m_runningNestedMessageLoop;
184 int m_ignoreScriptParsedEventsCounter; 183 int m_ignoreScriptParsedEventsCounter;
185 bool m_scheduledOOMBreak = false; 184 bool m_scheduledOOMBreak = false;
186 int m_targetContextGroupId = 0; 185 int m_targetContextGroupId = 0;
186 int m_pausedContextGroupId = 0;
187 187
188 using AsyncTaskToStackTrace = 188 using AsyncTaskToStackTrace =
189 protocol::HashMap<void*, std::weak_ptr<AsyncStackTrace>>; 189 protocol::HashMap<void*, std::weak_ptr<AsyncStackTrace>>;
190 AsyncTaskToStackTrace m_asyncTaskStacks; 190 AsyncTaskToStackTrace m_asyncTaskStacks;
191 AsyncTaskToStackTrace m_asyncTaskCreationStacks; 191 AsyncTaskToStackTrace m_asyncTaskCreationStacks;
192 protocol::HashSet<void*> m_recurringTasks; 192 protocol::HashSet<void*> m_recurringTasks;
193 protocol::HashMap<void*, void*> m_parentTask; 193 protocol::HashMap<void*, void*> m_parentTask;
194 194
195 int m_maxAsyncCallStacks; 195 int m_maxAsyncCallStacks;
196 int m_maxAsyncCallStackDepth; 196 int m_maxAsyncCallStackDepth;
(...skipping 18 matching lines...) Expand all
215 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; 215 v8::debug::ExceptionBreakState m_pauseOnExceptionsState;
216 216
217 WasmTranslation m_wasmTranslation; 217 WasmTranslation m_wasmTranslation;
218 218
219 DISALLOW_COPY_AND_ASSIGN(V8Debugger); 219 DISALLOW_COPY_AND_ASSIGN(V8Debugger);
220 }; 220 };
221 221
222 } // namespace v8_inspector 222 } // namespace v8_inspector
223 223
224 #endif // V8_INSPECTOR_V8DEBUGGER_H_ 224 #endif // V8_INSPECTOR_V8DEBUGGER_H_
OLDNEW
« no previous file with comments | « no previous file | src/inspector/v8-debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698