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

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

Issue 2226863003: [DevTools] Reduce API surface of String16. (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/platform/v8_inspector/V8DebuggerAgentImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
index 584c0164e0339ae5b3d39bc8d4e9001d6f6e7a8f..d9cae6c2a7ca31024b241164e32de4a85b262557 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
@@ -70,7 +70,7 @@ static String16 breakpointIdSuffix(V8DebuggerAgentImpl::BreakpointSource source)
static String16 generateBreakpointId(const String16& scriptId, int lineNumber, int columnNumber, V8DebuggerAgentImpl::BreakpointSource source)
{
- return scriptId + ":" + String16::fromInteger(lineNumber) + ":" + String16::fromInteger(columnNumber) + breakpointIdSuffix(source);
+ return scriptId + ":" + protocol::string16FromInteger(lineNumber) + ":" + protocol::string16FromInteger(columnNumber) + breakpointIdSuffix(source);
}
static bool positionComparator(const std::pair<int, int>& a, const std::pair<int, int>& b)
@@ -288,7 +288,7 @@ void V8DebuggerAgentImpl::setBreakpointByUrl(ErrorString* errorString,
String16 condition = optionalCondition.fromMaybe("");
bool isRegex = optionalURLRegex.isJust();
- String16 breakpointId = (isRegex ? "/" + url + "/" : url) + ":" + String16::fromInteger(lineNumber) + ":" + String16::fromInteger(columnNumber);
+ String16 breakpointId = (isRegex ? "/" + url + "/" : url) + ":" + protocol::string16FromInteger(lineNumber) + ":" + protocol::string16FromInteger(columnNumber);
protocol::DictionaryValue* breakpointsCookie = m_state->getObject(DebuggerAgentState::javaScriptBreakpoints);
if (!breakpointsCookie) {
std::unique_ptr<protocol::DictionaryValue> newValue = protocol::DictionaryValue::create();
@@ -433,7 +433,7 @@ bool V8DebuggerAgentImpl::isCallFrameWithUnknownScriptOrBlackboxed(JavaScriptCal
{
if (!frame)
return true;
- ScriptsMap::iterator it = m_scripts.find(String16::fromInteger(frame->sourceID()));
+ ScriptsMap::iterator it = m_scripts.find(protocol::string16FromInteger(frame->sourceID()));
if (it == m_scripts.end()) {
// Unknown scripts are blackboxed.
return true;
@@ -443,7 +443,7 @@ bool V8DebuggerAgentImpl::isCallFrameWithUnknownScriptOrBlackboxed(JavaScriptCal
if (!scriptSourceURL.isEmpty() && m_blackboxPattern->match(scriptSourceURL) != -1)
return true;
}
- auto itBlackboxedPositions = m_blackboxedPositions.find(String16::fromInteger(frame->sourceID()));
+ auto itBlackboxedPositions = m_blackboxedPositions.find(protocol::string16FromInteger(frame->sourceID()));
if (itBlackboxedPositions == m_blackboxedPositions.end())
return false;
@@ -1064,7 +1064,7 @@ V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::didPause(v8::Local<v8
// Skip pause in internal scripts (e.g. InjectedScriptSource.js).
if (topCallFrame) {
- ScriptsMap::iterator it = m_scripts.find(String16::fromInteger(topCallFrame->sourceID()));
+ ScriptsMap::iterator it = m_scripts.find(protocol::string16FromInteger(topCallFrame->sourceID()));
if (it != m_scripts.end() && it->second->isInternalScript())
return RequestStepFrame;
}

Powered by Google App Engine
This is Rietveld 408576698