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

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

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/InjectedScriptHost.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp
index 7d0493cf312315af0f9a5819cabc8fe1fb845ccd..52ad495689c8068ad28c4bb578ccb804aa7a1990 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp
@@ -30,12 +30,11 @@
#include "platform/v8_inspector/InjectedScriptHost.h"
+#include "platform/inspector_protocol/String16.h"
#include "platform/inspector_protocol/Values.h"
#include "platform/v8_inspector/V8DebuggerAgentImpl.h"
#include "platform/v8_inspector/public/V8Debugger.h"
-#include "wtf/text/StringBuilder.h"
-
namespace blink {
PassOwnPtr<InjectedScriptHost> InjectedScriptHost::create(V8DebuggerImpl* debugger)
@@ -108,32 +107,32 @@ V8RuntimeAgent::Inspectable* InjectedScriptHost::inspectedObject(unsigned num)
return m_inspectedObjects[num].get();
}
-void InjectedScriptHost::debugFunction(const String& scriptId, int lineNumber, int columnNumber)
+void InjectedScriptHost::debugFunction(const String16& scriptId, int lineNumber, int columnNumber)
{
if (m_debuggerAgent)
m_debuggerAgent->setBreakpointAt(scriptId, lineNumber, columnNumber, V8DebuggerAgentImpl::DebugCommandBreakpointSource);
}
-void InjectedScriptHost::undebugFunction(const String& scriptId, int lineNumber, int columnNumber)
+void InjectedScriptHost::undebugFunction(const String16& scriptId, int lineNumber, int columnNumber)
{
if (m_debuggerAgent)
m_debuggerAgent->removeBreakpointAt(scriptId, lineNumber, columnNumber, V8DebuggerAgentImpl::DebugCommandBreakpointSource);
}
-void InjectedScriptHost::monitorFunction(const String& scriptId, int lineNumber, int columnNumber, const String& functionName)
+void InjectedScriptHost::monitorFunction(const String16& scriptId, int lineNumber, int columnNumber, const String16& functionName)
{
- StringBuilder builder;
- builder.appendLiteral("console.log(\"function ");
+ String16Builder builder;
+ builder.append("console.log(\"function ");
if (functionName.isEmpty())
- builder.appendLiteral("(anonymous function)");
+ builder.append("(anonymous function)");
else
builder.append(functionName);
- builder.appendLiteral(" called\" + (arguments.length > 0 ? \" with arguments: \" + Array.prototype.join.call(arguments, \", \") : \"\")) && false");
+ builder.append(" called\" + (arguments.length > 0 ? \" with arguments: \" + Array.prototype.join.call(arguments, \", \") : \"\")) && false");
if (m_debuggerAgent)
m_debuggerAgent->setBreakpointAt(scriptId, lineNumber, columnNumber, V8DebuggerAgentImpl::MonitorCommandBreakpointSource, builder.toString());
}
-void InjectedScriptHost::unmonitorFunction(const String& scriptId, int lineNumber, int columnNumber)
+void InjectedScriptHost::unmonitorFunction(const String16& scriptId, int lineNumber, int columnNumber)
{
if (m_debuggerAgent)
m_debuggerAgent->removeBreakpointAt(scriptId, lineNumber, columnNumber, V8DebuggerAgentImpl::MonitorCommandBreakpointSource);

Powered by Google App Engine
This is Rietveld 408576698