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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp

Issue 2260233002: [DevTools] Migrate v8_inspector/public from String16 to String{View,Buffer}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: styling Created 4 years, 4 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/v8_inspector/V8StackTraceImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp
index e0bab17d89084f086fb7987bf9f4d65a61e76453..8f7c5a6c0cf110ad9722f29285ff2c60d3b8fed2 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8StackTraceImpl.cpp
@@ -185,10 +185,10 @@ V8StackTraceImpl::~V8StackTraceImpl()
{
}
-String16 V8StackTraceImpl::topSourceURL() const
+StringView V8StackTraceImpl::topSourceURL() const
{
DCHECK(m_frames.size());
- return m_frames[0].m_scriptName;
+ return toStringView(m_frames[0].m_scriptName);
}
int V8StackTraceImpl::topLineNumber() const
@@ -203,16 +203,16 @@ int V8StackTraceImpl::topColumnNumber() const
return m_frames[0].m_columnNumber;
}
-String16 V8StackTraceImpl::topFunctionName() const
+StringView V8StackTraceImpl::topFunctionName() const
{
DCHECK(m_frames.size());
- return m_frames[0].m_functionName;
+ return toStringView(m_frames[0].m_functionName);
}
-String16 V8StackTraceImpl::topScriptId() const
+StringView V8StackTraceImpl::topScriptId() const
{
DCHECK(m_frames.size());
- return m_frames[0].m_scriptId;
+ return toStringView(m_frames[0].m_scriptId);
}
std::unique_ptr<protocol::Runtime::StackTrace> V8StackTraceImpl::buildInspectorObjectImpl() const
@@ -245,7 +245,7 @@ std::unique_ptr<protocol::Runtime::API::StackTrace> V8StackTraceImpl::buildInspe
return buildInspectorObjectImpl();
}
-String16 V8StackTraceImpl::toString() const
+std::unique_ptr<StringBuffer> V8StackTraceImpl::toString() const
{
String16Builder stackTrace;
for (size_t i = 0; i < m_frames.size(); ++i) {
@@ -259,7 +259,8 @@ String16 V8StackTraceImpl::toString() const
stackTrace.append(String16::fromInteger(frame.columnNumber()));
stackTrace.append(')');
}
- return stackTrace.toString();
+ String16 string = stackTrace.toString();
+ return StringBufferImpl::adopt(string);
}
} // namespace v8_inspector

Powered by Google App Engine
This is Rietveld 408576698