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

Unified Diff: third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp

Issue 2226863003: [DevTools] Reduce API surface of String16. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wrong vector usage 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/core/inspector/ThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
index 0a6ccae580d1c98eba34ce3955ea3014017cd852..7ce90d0eded645a665a92bd6b1a4cc5ae431c18b 100644
--- a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
@@ -108,13 +108,13 @@ void ThreadDebugger::asyncTaskFinished(void* task)
m_v8Inspector->asyncTaskFinished(task);
}
-unsigned ThreadDebugger::promiseRejected(v8::Local<v8::Context> context, const String16& errorMessage, v8::Local<v8::Value> exception, std::unique_ptr<SourceLocation> location)
+unsigned ThreadDebugger::promiseRejected(v8::Local<v8::Context> context, const String& errorMessage, v8::Local<v8::Value> exception, std::unique_ptr<SourceLocation> location)
{
- const String16 defaultMessage = "Uncaught (in promise)";
- String16 message = errorMessage;
+ const String defaultMessage = "Uncaught (in promise)";
+ String message = errorMessage;
if (message.isEmpty())
message = defaultMessage;
- else if (message.startWith("Uncaught "))
+ else if (message.startsWith("Uncaught "))
message = message.substring(0, 8) + " (in promise)" + message.substring(8);
reportConsoleMessage(toExecutionContext(context), JSMessageSource, ErrorMessageLevel, message, location.get());
@@ -123,7 +123,7 @@ unsigned ThreadDebugger::promiseRejected(v8::Local<v8::Context> context, const S
void ThreadDebugger::promiseRejectionRevoked(v8::Local<v8::Context> context, unsigned promiseRejectionId)
{
- const String16 message = "Handler added to rejected promise";
+ const String message = "Handler added to rejected promise";
v8Inspector()->exceptionRevoked(context, promiseRejectionId, message);
}

Powered by Google App Engine
This is Rietveld 408576698