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

Unified Diff: third_party/WebKit/Source/platform/JSONValues.cpp

Issue 1588993005: Extended error reporting for SVG attribute parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add PLATFORM_EXPORT Created 4 years, 11 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 | « third_party/WebKit/Source/platform/JSONValues.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/JSONValues.cpp
diff --git a/third_party/WebKit/Source/platform/JSONValues.cpp b/third_party/WebKit/Source/platform/JSONValues.cpp
index 76ec444c96b439e55028075dd7ec6b4958437f1c..3001d16776fb8a75aee30dbfe6403eb1973a1f69 100644
--- a/third_party/WebKit/Source/platform/JSONValues.cpp
+++ b/third_party/WebKit/Source/platform/JSONValues.cpp
@@ -66,9 +66,8 @@ void writeIndent(int depth, StringBuilder* output)
} // anonymous namespace
-void doubleQuoteStringForJSON(const String& str, StringBuilder* dst)
+void escapeStringForJSON(const String& str, StringBuilder* dst)
{
- dst->append('"');
for (unsigned i = 0; i < str.length(); ++i) {
UChar c = str[i];
if (!escapeChar(c, dst)) {
@@ -84,6 +83,12 @@ void doubleQuoteStringForJSON(const String& str, StringBuilder* dst)
}
}
}
+}
+
+void doubleQuoteStringForJSON(const String& str, StringBuilder* dst)
+{
+ dst->append('"');
+ escapeStringForJSON(str, dst);
dst->append('"');
}
« no previous file with comments | « third_party/WebKit/Source/platform/JSONValues.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698