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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/ErrorSupport.cpp

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/inspector_protocol/ErrorSupport.cpp
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/ErrorSupport.cpp b/third_party/WebKit/Source/platform/inspector_protocol/ErrorSupport.cpp
index bb0b0dacd9f4c3a28e2aac3fea292a18d8f0b08a..0b360091cebf6e8ce9d9711601b8df1984dae18b 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/ErrorSupport.cpp
+++ b/third_party/WebKit/Source/platform/inspector_protocol/ErrorSupport.cpp
@@ -4,20 +4,20 @@
#include "platform/inspector_protocol/ErrorSupport.h"
-#include "wtf/text/StringBuilder.h"
+#include "platform/inspector_protocol/String16.h"
namespace blink {
namespace protocol {
ErrorSupport::ErrorSupport() : m_errorString(nullptr) { }
-ErrorSupport::ErrorSupport(String* errorString) : m_errorString(errorString) { }
+ErrorSupport::ErrorSupport(String16* errorString) : m_errorString(errorString) { }
ErrorSupport::~ErrorSupport()
{
if (m_errorString && hasErrors())
*m_errorString = "Internal error(s): " + errors();
}
-void ErrorSupport::setName(const String& name)
+void ErrorSupport::setName(const String16& name)
{
ASSERT(m_path.size());
m_path[m_path.size() - 1] = name;
@@ -25,7 +25,7 @@ void ErrorSupport::setName(const String& name)
void ErrorSupport::push()
{
- m_path.append(String());
+ m_path.append(String16());
}
void ErrorSupport::pop()
@@ -33,9 +33,9 @@ void ErrorSupport::pop()
m_path.removeLast();
}
-void ErrorSupport::addError(const String& error)
+void ErrorSupport::addError(const String16& error)
{
- StringBuilder builder;
+ String16Builder builder;
for (size_t i = 0; i < m_path.size(); ++i) {
if (i)
builder.append(".");
@@ -51,9 +51,9 @@ bool ErrorSupport::hasErrors()
return m_errors.size();
}
-String ErrorSupport::errors()
+String16 ErrorSupport::errors()
{
- StringBuilder builder;
+ String16Builder builder;
for (size_t i = 0; i < m_errors.size(); ++i) {
if (i)
builder.append("; ");

Powered by Google App Engine
This is Rietveld 408576698