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

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

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 2 Created 4 years, 9 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/V8AsyncCallTracker.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp
index b933bd8a09488c5c135187f6eb0f2ff2f0ab6079..77772484b7e439e492c790ba23390461b6d3356a 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp
@@ -5,9 +5,7 @@
#include "platform/v8_inspector/V8AsyncCallTracker.h"
#include "platform/inspector_protocol/Collections.h"
-#include "wtf/text/StringBuilder.h"
-#include "wtf/text/StringHash.h"
-#include "wtf/text/WTFString.h"
+#include "platform/inspector_protocol/String16.h"
namespace blink {
@@ -19,9 +17,9 @@ static const char v8AsyncTaskEventDidHandle[] = "didHandle";
}
-static String makeV8AsyncTaskUniqueId(const String& eventName, int id)
+static String16 makeV8AsyncTaskUniqueId(const String16& eventName, int id)
{
- StringBuilder builder;
+ String16Builder builder;
builder.append(eventName);
builder.append(" -> ");
builder.appendNumber(id);
@@ -55,7 +53,7 @@ void V8AsyncCallTracker::contextDisposed(int contextId)
m_idToOperations.remove(contextId);
}
-void V8AsyncCallTracker::didReceiveV8AsyncTaskEvent(v8::Local<v8::Context> context, const String& eventType, const String& eventName, int id)
+void V8AsyncCallTracker::didReceiveV8AsyncTaskEvent(v8::Local<v8::Context> context, const String16& eventType, const String16& eventName, int id)
{
ASSERT(m_debuggerAgent->trackingAsyncCalls());
if (eventType == v8AsyncTaskEventEnqueue)
@@ -73,7 +71,7 @@ void V8AsyncCallTracker::weakCallback(const v8::WeakCallbackInfo<Operations>& da
data.GetParameter()->target->contextDisposed(data.GetParameter()->contextId);
}
-void V8AsyncCallTracker::didEnqueueV8AsyncTask(v8::Local<v8::Context> context, const String& eventName, int id)
+void V8AsyncCallTracker::didEnqueueV8AsyncTask(v8::Local<v8::Context> context, const String16& eventName, int id)
{
ASSERT(!context.IsEmpty());
ASSERT(m_debuggerAgent->trackingAsyncCalls());
@@ -94,13 +92,13 @@ void V8AsyncCallTracker::didEnqueueV8AsyncTask(v8::Local<v8::Context> context, c
operations->map.set(makeV8AsyncTaskUniqueId(eventName, id), operationId);
}
-void V8AsyncCallTracker::willHandleV8AsyncTask(v8::Local<v8::Context> context, const String& eventName, int id)
+void V8AsyncCallTracker::willHandleV8AsyncTask(v8::Local<v8::Context> context, const String16& eventName, int id)
{
ASSERT(!context.IsEmpty());
ASSERT(m_debuggerAgent->trackingAsyncCalls());
int contextId = V8Debugger::contextId(context);
if (Operations* operations = m_idToOperations.get(contextId)) {
- String taskId = makeV8AsyncTaskUniqueId(eventName, id);
+ String16 taskId = makeV8AsyncTaskUniqueId(eventName, id);
int operationId = operations->map.get(taskId);
m_debuggerAgent->traceAsyncCallbackStarting(operationId);
m_debuggerAgent->traceAsyncOperationCompleted(operationId);
@@ -110,7 +108,7 @@ void V8AsyncCallTracker::willHandleV8AsyncTask(v8::Local<v8::Context> context, c
}
}
-void V8AsyncCallTracker::completeOperations(const protocol::HashMap<String, int>& contextCallChains)
+void V8AsyncCallTracker::completeOperations(const protocol::HashMap<String16, int>& contextCallChains)
{
for (const auto& it : contextCallChains)
m_debuggerAgent->traceAsyncOperationCompleted(*it.second);

Powered by Google App Engine
This is Rietveld 408576698