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

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

Issue 1779033003: DevTools: always use 16bit strings for inspector protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/V8ProfilerAgentImpl.h" 5 #include "platform/v8_inspector/V8ProfilerAgentImpl.h"
6 6
7 #include "platform/v8_inspector/Atomics.h" 7 #include "platform/v8_inspector/Atomics.h"
8 #include "platform/v8_inspector/V8DebuggerImpl.h" 8 #include "platform/v8_inspector/V8DebuggerImpl.h"
9 #include "platform/v8_inspector/V8StackTraceImpl.h" 9 #include "platform/v8_inspector/V8StackTraceImpl.h"
10 #include "platform/v8_inspector/V8StringUtil.h" 10 #include "platform/v8_inspector/V8StringUtil.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 startProfiling(id); 146 startProfiling(id);
147 m_frontend->consoleProfileStarted(id, currentDebugLocation(m_debugger), titl e); 147 m_frontend->consoleProfileStarted(id, currentDebugLocation(m_debugger), titl e);
148 } 148 }
149 149
150 void V8ProfilerAgentImpl::consoleProfileEnd(const String16& title) 150 void V8ProfilerAgentImpl::consoleProfileEnd(const String16& title)
151 { 151 {
152 ASSERT(m_frontend && m_enabled); 152 ASSERT(m_frontend && m_enabled);
153 String16 id; 153 String16 id;
154 String16 resolvedTitle; 154 String16 resolvedTitle;
155 // Take last started profile if no title was passed. 155 // Take last started profile if no title was passed.
156 if (title.isNull()) { 156 if (title.isEmpty()) {
157 if (m_startedProfiles.isEmpty()) 157 if (m_startedProfiles.isEmpty())
158 return; 158 return;
159 id = m_startedProfiles.last().m_id; 159 id = m_startedProfiles.last().m_id;
160 resolvedTitle = m_startedProfiles.last().m_title; 160 resolvedTitle = m_startedProfiles.last().m_title;
161 m_startedProfiles.removeLast(); 161 m_startedProfiles.removeLast();
162 } else { 162 } else {
163 for (size_t i = 0; i < m_startedProfiles.size(); i++) { 163 for (size_t i = 0; i < m_startedProfiles.size(); i++) {
164 if (m_startedProfiles[i].m_title == title) { 164 if (m_startedProfiles[i].m_title == title) {
165 resolvedTitle = title; 165 resolvedTitle = title;
166 id = m_startedProfiles[i].m_id; 166 id = m_startedProfiles[i].m_id;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 293
294 void V8ProfilerAgentImpl::idleStarted() 294 void V8ProfilerAgentImpl::idleStarted()
295 { 295 {
296 if (!isRecording()) 296 if (!isRecording())
297 return; 297 return;
298 m_isolate->GetCpuProfiler()->SetIdle(true); 298 m_isolate->GetCpuProfiler()->SetIdle(true);
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698