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

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

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (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/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 db93b851e86ce39301a4b4bab054583de1917e23..a0a20e3239f363540275aad10e79c62967077a2d 100644
--- a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
@@ -20,6 +20,7 @@
#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/InspectorDOMDebuggerAgent.h"
#include "core/inspector/InspectorTraceEvents.h"
+#include "core/inspector/V8InspectorStringConversion.h"
#include "platform/ScriptForbiddenScope.h"
#include "wtf/CurrentTime.h"
#include "wtf/PtrUtil.h"
@@ -85,7 +86,7 @@ void ThreadDebugger::idleFinished(v8::Isolate* isolate)
void ThreadDebugger::asyncTaskScheduled(const String& operationName, void* task, bool recurring)
{
- m_v8Inspector->asyncTaskScheduled(operationName, task, recurring);
+ m_v8Inspector->asyncTaskScheduled(toV8InspectorString(operationName), task, recurring);
}
void ThreadDebugger::asyncTaskCanceled(void* task)
@@ -118,13 +119,13 @@ unsigned ThreadDebugger::promiseRejected(v8::Local<v8::Context> context, const S
message = message.substring(0, 8) + " (in promise)" + message.substring(8);
reportConsoleMessage(toExecutionContext(context), JSMessageSource, ErrorMessageLevel, message, location.get());
- return v8Inspector()->exceptionThrown(context, defaultMessage, exception, message, location->url(), location->lineNumber(), location->columnNumber(), location->takeStackTrace(), location->scriptId());
+ return v8Inspector()->exceptionThrown(context, toV8InspectorString(defaultMessage), exception, toV8InspectorString(message), toV8InspectorString(location->url()), location->lineNumber(), location->columnNumber(), location->takeStackTrace(), location->scriptId());
}
void ThreadDebugger::promiseRejectionRevoked(v8::Local<v8::Context> context, unsigned promiseRejectionId)
{
const String message = "Handler added to rejected promise";
- v8Inspector()->exceptionRevoked(context, promiseRejectionId, message);
+ v8Inspector()->exceptionRevoked(context, promiseRejectionId, toV8InspectorString(message));
}
void ThreadDebugger::beginUserGesture()
@@ -137,7 +138,7 @@ void ThreadDebugger::endUserGesture()
m_userGestureIndicator.reset();
}
-String16 ThreadDebugger::valueSubtype(v8::Local<v8::Value> value)
+v8_inspector::String16 ThreadDebugger::valueSubtype(v8::Local<v8::Value> value)
{
if (V8Node::hasInstance(value, m_isolate))
return "node";
@@ -149,7 +150,7 @@ String16 ThreadDebugger::valueSubtype(v8::Local<v8::Value> value)
}
if (V8DOMException::hasInstance(value, m_isolate))
return "error";
- return String();
+ return v8_inspector::String16();
}
bool ThreadDebugger::formatAccessorsAsProperties(v8::Local<v8::Value> value)
@@ -327,20 +328,20 @@ void ThreadDebugger::getEventListenersCallback(const v8::FunctionCallbackInfo<v8
info.GetReturnValue().Set(result);
}
-void ThreadDebugger::consoleTime(const String16& title)
+void ThreadDebugger::consoleTime(const v8_inspector::String16& title)
{
- TRACE_EVENT_COPY_ASYNC_BEGIN0("blink.console", String(title).utf8().data(), this);
+ TRACE_EVENT_COPY_ASYNC_BEGIN0("blink.console", toCoreString(title).utf8().data(), this);
caseq 2016/08/19 02:50:36 This and the two below are kinda time-sensitive, i
}
-void ThreadDebugger::consoleTimeEnd(const String16& title)
+void ThreadDebugger::consoleTimeEnd(const v8_inspector::String16& title)
{
- TRACE_EVENT_COPY_ASYNC_END0("blink.console", String(title).utf8().data(), this);
+ TRACE_EVENT_COPY_ASYNC_END0("blink.console", toCoreString(title).utf8().data(), this);
}
-void ThreadDebugger::consoleTimeStamp(const String16& title)
+void ThreadDebugger::consoleTimeStamp(const v8_inspector::String16& title)
{
v8::Isolate* isolate = m_isolate;
- TRACE_EVENT_INSTANT1("devtools.timeline", "TimeStamp", TRACE_EVENT_SCOPE_THREAD, "data", InspectorTimeStampEvent::data(currentExecutionContext(isolate), title));
+ TRACE_EVENT_INSTANT1("devtools.timeline", "TimeStamp", TRACE_EVENT_SCOPE_THREAD, "data", InspectorTimeStampEvent::data(currentExecutionContext(isolate), toCoreString(title)));
}
void ThreadDebugger::startRepeatingTimer(double interval, V8InspectorClient::TimerCallback callback, void* data)

Powered by Google App Engine
This is Rietveld 408576698