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

Unified Diff: src/log-utils.cc

Issue 16901014: CPUProfiler: Simplify logging part of CreateCodeEvent functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments addressed Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/log-utils.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log-utils.cc
diff --git a/src/log-utils.cc b/src/log-utils.cc
index f033172734a6c643b09c3fa33098f98ddf25c67f..a733b523eac4fba3b2b3c9194e1b9d6eaa5a13b4 100644
--- a/src/log-utils.cc
+++ b/src/log-utils.cc
@@ -237,6 +237,18 @@ void LogMessageBuilder::Append(const char c) {
}
+void LogMessageBuilder::AppendDoubleQuotedString(const char* string) {
+ Append('"');
+ for (const char* p = string; *p != '\0'; p++) {
+ if (*p == '"') {
+ Append('\\');
+ }
+ Append(*p);
+ }
+ Append('"');
+}
+
+
void LogMessageBuilder::Append(String* str) {
DisallowHeapAllocation no_gc; // Ensure string stay valid.
int length = str->length();
« no previous file with comments | « src/log-utils.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698