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

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

Issue 2921373002: [inspector] Test how multiple sessions interact with pausing (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 | « no previous file | 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 else 953 else
954 m_maxAsyncCallStackDepthMap[agent] = depth; 954 m_maxAsyncCallStackDepthMap[agent] = depth;
955 955
956 int maxAsyncCallStackDepth = 0; 956 int maxAsyncCallStackDepth = 0;
957 for (const auto& pair : m_maxAsyncCallStackDepthMap) { 957 for (const auto& pair : m_maxAsyncCallStackDepthMap) {
958 if (pair.second > maxAsyncCallStackDepth) 958 if (pair.second > maxAsyncCallStackDepth)
959 maxAsyncCallStackDepth = pair.second; 959 maxAsyncCallStackDepth = pair.second;
960 } 960 }
961 961
962 if (m_maxAsyncCallStackDepth == maxAsyncCallStackDepth) return; 962 if (m_maxAsyncCallStackDepth == maxAsyncCallStackDepth) return;
963 // TODO(dgozman): ideally, this should be per context group.
963 m_maxAsyncCallStackDepth = maxAsyncCallStackDepth; 964 m_maxAsyncCallStackDepth = maxAsyncCallStackDepth;
964 if (!maxAsyncCallStackDepth) allAsyncTasksCanceled(); 965 if (!maxAsyncCallStackDepth) allAsyncTasksCanceled();
965 } 966 }
966 967
967 void V8Debugger::asyncTaskCreatedForStack(void* task, void* parentTask) { 968 void V8Debugger::asyncTaskCreatedForStack(void* task, void* parentTask) {
968 if (!m_maxAsyncCallStackDepth) return; 969 if (!m_maxAsyncCallStackDepth) return;
969 if (parentTask) m_parentTask[task] = parentTask; 970 if (parentTask) m_parentTask[task] = parentTask;
970 v8::HandleScope scope(m_isolate); 971 v8::HandleScope scope(m_isolate);
971 std::shared_ptr<AsyncStackTrace> asyncCreation = 972 std::shared_ptr<AsyncStackTrace> asyncCreation =
972 AsyncStackTrace::capture(this, currentContextGroupId(), String16(), 973 AsyncStackTrace::capture(this, currentContextGroupId(), String16(),
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 fprintf(stdout, "Async stacks count: %d\n", m_asyncStacksCount); 1209 fprintf(stdout, "Async stacks count: %d\n", m_asyncStacksCount);
1209 fprintf(stdout, "Scheduled async tasks: %zu\n", m_asyncTaskStacks.size()); 1210 fprintf(stdout, "Scheduled async tasks: %zu\n", m_asyncTaskStacks.size());
1210 fprintf(stdout, "Created async tasks: %zu\n", 1211 fprintf(stdout, "Created async tasks: %zu\n",
1211 m_asyncTaskCreationStacks.size()); 1212 m_asyncTaskCreationStacks.size());
1212 fprintf(stdout, "Async tasks with parent: %zu\n", m_parentTask.size()); 1213 fprintf(stdout, "Async tasks with parent: %zu\n", m_parentTask.size());
1213 fprintf(stdout, "Recurring async tasks: %zu\n", m_recurringTasks.size()); 1214 fprintf(stdout, "Recurring async tasks: %zu\n", m_recurringTasks.size());
1214 fprintf(stdout, "\n"); 1215 fprintf(stdout, "\n");
1215 } 1216 }
1216 1217
1217 } // namespace v8_inspector 1218 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « no previous file | src/inspector/v8-debugger-agent-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698