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

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

Issue 2923243002: [inspector] Return error when paused in different context group (Closed)
Patch Set: Created 3 years, 6 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 | « src/inspector/v8-debugger.h ('k') | src/inspector/v8-debugger-agent-impl.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 #include "src/inspector/v8-debugger.h" 5 #include "src/inspector/v8-debugger.h"
6 6
7 #include "src/inspector/debugger-script.h" 7 #include "src/inspector/debugger-script.h"
8 #include "src/inspector/inspected-context.h" 8 #include "src/inspector/inspected-context.h"
9 #include "src/inspector/protocol/Protocol.h" 9 #include "src/inspector/protocol/Protocol.h"
10 #include "src/inspector/script-breakpoint.h" 10 #include "src/inspector/script-breakpoint.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 m_debuggerScript.Reset(); 191 m_debuggerScript.Reset();
192 m_debuggerContext.Reset(); 192 m_debuggerContext.Reset();
193 allAsyncTasksCanceled(); 193 allAsyncTasksCanceled();
194 m_taskWithScheduledBreak = nullptr; 194 m_taskWithScheduledBreak = nullptr;
195 m_wasmTranslation.Clear(); 195 m_wasmTranslation.Clear();
196 v8::debug::SetDebugDelegate(m_isolate, nullptr); 196 v8::debug::SetDebugDelegate(m_isolate, nullptr);
197 v8::debug::SetOutOfMemoryCallback(m_isolate, nullptr, nullptr); 197 v8::debug::SetOutOfMemoryCallback(m_isolate, nullptr, nullptr);
198 m_isolate->RestoreOriginalHeapLimit(); 198 m_isolate->RestoreOriginalHeapLimit();
199 } 199 }
200 200
201 bool V8Debugger::isPausedInContextGroup(int contextGroupId) const {
202 return isPaused() && m_pausedContextGroupId == contextGroupId;
203 }
204
201 bool V8Debugger::enabled() const { return !m_debuggerScript.IsEmpty(); } 205 bool V8Debugger::enabled() const { return !m_debuggerScript.IsEmpty(); }
202 206
203 void V8Debugger::getCompiledScripts( 207 void V8Debugger::getCompiledScripts(
204 int contextGroupId, 208 int contextGroupId,
205 std::vector<std::unique_ptr<V8DebuggerScript>>& result) { 209 std::vector<std::unique_ptr<V8DebuggerScript>>& result) {
206 v8::HandleScope scope(m_isolate); 210 v8::HandleScope scope(m_isolate);
207 v8::PersistentValueVector<v8::debug::Script> scripts(m_isolate); 211 v8::PersistentValueVector<v8::debug::Script> scripts(m_isolate);
208 v8::debug::GetLoadedScripts(m_isolate, scripts); 212 v8::debug::GetLoadedScripts(m_isolate, scripts);
209 for (size_t i = 0; i < scripts.Size(); ++i) { 213 for (size_t i = 0; i < scripts.Size(); ++i) {
210 v8::Local<v8::debug::Script> script = scripts.Get(i); 214 v8::Local<v8::debug::Script> script = scripts.Get(i);
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 fprintf(stdout, "Async stacks count: %d\n", m_asyncStacksCount); 1213 fprintf(stdout, "Async stacks count: %d\n", m_asyncStacksCount);
1210 fprintf(stdout, "Scheduled async tasks: %zu\n", m_asyncTaskStacks.size()); 1214 fprintf(stdout, "Scheduled async tasks: %zu\n", m_asyncTaskStacks.size());
1211 fprintf(stdout, "Created async tasks: %zu\n", 1215 fprintf(stdout, "Created async tasks: %zu\n",
1212 m_asyncTaskCreationStacks.size()); 1216 m_asyncTaskCreationStacks.size());
1213 fprintf(stdout, "Async tasks with parent: %zu\n", m_parentTask.size()); 1217 fprintf(stdout, "Async tasks with parent: %zu\n", m_parentTask.size());
1214 fprintf(stdout, "Recurring async tasks: %zu\n", m_recurringTasks.size()); 1218 fprintf(stdout, "Recurring async tasks: %zu\n", m_recurringTasks.size());
1215 fprintf(stdout, "\n"); 1219 fprintf(stdout, "\n");
1216 } 1220 }
1217 1221
1218 } // namespace v8_inspector 1222 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger.h ('k') | src/inspector/v8-debugger-agent-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698