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

Unified Diff: src/inspector/v8-debugger-agent-impl.cc

Issue 2493723003: [inspector] Fix and refactor String16 (Closed)
Patch Set: Windows unhappy; revert last patch and define move assignment manually Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/string-16.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger-agent-impl.cc
diff --git a/src/inspector/v8-debugger-agent-impl.cc b/src/inspector/v8-debugger-agent-impl.cc
index ab4e349909865e93c5c2ecc23f888dd16a45e6da..224ae282c4d70af974f35a094e05b28c2b46feaa 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -76,8 +76,14 @@ static String16 breakpointIdSuffix(
static String16 generateBreakpointId(
const String16& scriptId, int lineNumber, int columnNumber,
V8DebuggerAgentImpl::BreakpointSource source) {
- return scriptId + ":" + String16::fromInteger(lineNumber) + ":" +
- String16::fromInteger(columnNumber) + breakpointIdSuffix(source);
+ String16Builder builder;
dgozman 2016/11/15 15:32:25 Just curious why builder and not concat with fromI
Clemens Hammacher 2016/11/15 17:00:44 Performance ;)
+ builder.append(scriptId);
+ builder.append(':');
+ builder.appendNumber(lineNumber);
+ builder.append(':');
+ builder.appendNumber(columnNumber);
+ builder.append(breakpointIdSuffix(source));
+ return builder.toString();
}
static bool positionComparator(const std::pair<int, int>& a,
« no previous file with comments | « src/inspector/string-16.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698