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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8InspectorImpl.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/V8InspectorImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InspectorImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8InspectorImpl.cpp
index 1a56906f782416d1b44e9dcd76e71a8de385bb7a..d5c67122b059654792b3506da57a1c6330ee167f 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8InspectorImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8InspectorImpl.cpp
@@ -166,7 +166,7 @@ std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace(v8::Local<v8::St
return m_debugger->createStackTrace(stackTrace);
}
-std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(int contextGroupId, protocol::FrontendChannel* channel, const String16* state)
+std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(int contextGroupId, protocol::FrontendChannel* channel, const StringView& state)
{
DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend());
std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::create(this, contextGroupId, channel, state);
@@ -265,25 +265,25 @@ void V8InspectorImpl::idleFinished()
m_isolate->GetCpuProfiler()->SetIdle(false);
}
-unsigned V8InspectorImpl::exceptionThrown(v8::Local<v8::Context> context, const String16& message, v8::Local<v8::Value> exception, const String16& detailedMessage, const String16& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8StackTrace> stackTrace, int scriptId)
+unsigned V8InspectorImpl::exceptionThrown(v8::Local<v8::Context> context, const StringView& message, v8::Local<v8::Value> exception, const StringView& detailedMessage, const StringView& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8StackTrace> stackTrace, int scriptId)
{
int contextGroupId = V8Debugger::getGroupId(context);
if (!contextGroupId || m_muteExceptionsMap[contextGroupId])
return 0;
std::unique_ptr<V8StackTraceImpl> stackTraceImpl = wrapUnique(static_cast<V8StackTraceImpl*>(stackTrace.release()));
unsigned exceptionId = nextExceptionId();
- std::unique_ptr<V8ConsoleMessage> consoleMessage = V8ConsoleMessage::createForException(m_client->currentTimeMS(), detailedMessage, url, lineNumber, columnNumber, std::move(stackTraceImpl), scriptId, m_isolate, message, V8Debugger::contextId(context), exception, exceptionId);
+ std::unique_ptr<V8ConsoleMessage> consoleMessage = V8ConsoleMessage::createForException(m_client->currentTimeMS(), toString16(detailedMessage), toString16(url), lineNumber, columnNumber, std::move(stackTraceImpl), scriptId, m_isolate, toString16(message), V8Debugger::contextId(context), exception, exceptionId);
ensureConsoleMessageStorage(contextGroupId)->addMessage(std::move(consoleMessage));
return exceptionId;
}
-void V8InspectorImpl::exceptionRevoked(v8::Local<v8::Context> context, unsigned exceptionId, const String16& message)
+void V8InspectorImpl::exceptionRevoked(v8::Local<v8::Context> context, unsigned exceptionId, const StringView& message)
{
int contextGroupId = V8Debugger::getGroupId(context);
if (!contextGroupId)
return;
- std::unique_ptr<V8ConsoleMessage> consoleMessage = V8ConsoleMessage::createForRevokedException(m_client->currentTimeMS(), message, exceptionId);
+ std::unique_ptr<V8ConsoleMessage> consoleMessage = V8ConsoleMessage::createForRevokedException(m_client->currentTimeMS(), toString16(message), exceptionId);
ensureConsoleMessageStorage(contextGroupId)->addMessage(std::move(consoleMessage));
}
@@ -292,7 +292,7 @@ std::unique_ptr<V8StackTrace> V8InspectorImpl::captureStackTrace(bool fullStack)
return m_debugger->captureStackTrace(fullStack);
}
-void V8InspectorImpl::asyncTaskScheduled(const String16& taskName, void* task, bool recurring)
+void V8InspectorImpl::asyncTaskScheduled(const StringView& taskName, void* task, bool recurring)
{
m_debugger->asyncTaskScheduled(taskName, task, recurring);
}

Powered by Google App Engine
This is Rietveld 408576698