Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 1845363003: String replaceWithLiteral should just use strlen, also rename to replace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another NUL fix. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 629b64f72490b07bafb5ea768b48e14b3bf93398..8def8d622b540f3c753fb45f8b4ea199bc38269a 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -1561,8 +1561,8 @@ void Node::showNode(const char* prefix) const
prefix = "";
if (isTextNode()) {
String value = nodeValue();
- value.replaceWithLiteral('\\', "\\\\");
- value.replaceWithLiteral('\n', "\\n");
+ value.replace('\\', "\\\\");
+ value.replace('\n', "\\n");
WTFLogAlways("%s%s\t%p \"%s\"\n", prefix, nodeName().utf8().data(), this, value.utf8().data());
} else if (isDocumentTypeNode()) {
WTFLogAlways("%sDOCTYPE %s\t%p\n", prefix, nodeName().utf8().data(), this);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine