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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8Console.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/V8Console.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
index fdcd662b0fceac5f71cb90616b3c414d500617e4..fbb77f16d1def7aa77ce5587df1e451b6e867b94 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
@@ -358,7 +358,7 @@ void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
if (title.isEmpty()) {
std::unique_ptr<V8StackTraceImpl> stackTrace = V8StackTraceImpl::capture(nullptr, 0, 1);
if (stackTrace)
- identifier = stackTrace->topSourceURL() + ":" + String16::fromInteger(stackTrace->topLineNumber());
+ identifier = toString16(stackTrace->topSourceURL()) + ":" + String16::fromInteger(stackTrace->topLineNumber());
} else {
identifier = title + "@";
}
@@ -415,7 +415,7 @@ static void timeFunction(const v8::FunctionCallbackInfo<v8::Value>& info, bool t
String16 protocolTitle = helper.firstArgToString("default");
if (timelinePrefix)
protocolTitle = "Timeline '" + protocolTitle + "'";
- client->consoleTime(protocolTitle);
+ client->consoleTime(toStringView(protocolTitle));
v8::Local<v8::Map> timeMap;
if (!helper.privateMap("V8Console#timeMap").ToLocal(&timeMap))
@@ -431,7 +431,7 @@ static void timeEndFunction(const v8::FunctionCallbackInfo<v8::Value>& info, boo
String16 protocolTitle = helper.firstArgToString("default");
if (timelinePrefix)
protocolTitle = "Timeline '" + protocolTitle + "'";
- client->consoleTimeEnd(protocolTitle);
+ client->consoleTimeEnd(toStringView(protocolTitle));
v8::Local<v8::Map> timeMap;
if (!helper.privateMap("V8Console#timeMap").ToLocal(&timeMap))
@@ -467,8 +467,10 @@ void V8Console::timeEndCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
void V8Console::timeStampCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ConsoleHelper helper(info);
- if (V8InspectorClient* client = helper.ensureDebuggerClient())
- client->consoleTimeStamp(helper.firstArgToString(String16()));
+ if (V8InspectorClient* client = helper.ensureDebuggerClient()) {
+ String16 title = helper.firstArgToString(String16());
+ client->consoleTimeStamp(toStringView(title));
+ }
}
void V8Console::memoryGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)

Powered by Google App Engine
This is Rietveld 408576698