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

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

Issue 2226863003: [DevTools] Reduce API surface of String16. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 55d0c4f01761e72d66a70c1af9fa0c828deff19e..4c9489828492df8f215c15d062aeefe7d5206c50 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
@@ -360,7 +360,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 = stackTrace->topSourceURL() + ":" + protocol::string16FromInteger(stackTrace->topLineNumber());
} else {
identifier = title + "@";
}
@@ -370,7 +370,7 @@ void V8Console::countCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
return;
int64_t count = helper.getIntFromMap(countMap, identifier, 0) + 1;
helper.setIntOnMap(countMap, identifier, count);
- helper.reportCallWithArgument(ConsoleAPIType::kCount, title + ": " + String16::fromInteger(count));
+ helper.reportCallWithArgument(ConsoleAPIType::kCount, title + ": " + protocol::string16FromInteger(count));
}
void V8Console::assertCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
@@ -439,7 +439,7 @@ static void timeEndFunction(const v8::FunctionCallbackInfo<v8::Value>& info, boo
if (!helper.privateMap("V8Console#timeMap").ToLocal(&timeMap))
return;
double elapsed = client->currentTimeMS() - helper.getDoubleFromMap(timeMap, protocolTitle, 0.0);
- String16 message = protocolTitle + ": " + String16::fromDoubleFixedPrecision(elapsed, 3) + "ms";
+ String16 message = protocolTitle + ": " + protocol::string16FromDoublePrecision3(elapsed) + "ms";
helper.reportCallWithArgument(ConsoleAPIType::kTimeEnd, message);
}
}
@@ -535,7 +535,7 @@ static void setFunctionBreakpoint(ConsoleHelper& helper, v8::Local<v8::Function>
V8DebuggerAgentImpl* debuggerAgent = helper.debuggerAgent();
if (!debuggerAgent)
return;
- String16 scriptId = String16::fromInteger(function->ScriptId());
+ String16 scriptId = protocol::string16FromInteger(function->ScriptId());
int lineNumber = function->GetScriptLineNumber();
int columnNumber = function->GetScriptColumnNumber();
if (lineNumber == v8::Function::kLineOffsetNotFound || columnNumber == v8::Function::kLineOffsetNotFound)

Powered by Google App Engine
This is Rietveld 408576698