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

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

Issue 1702673002: DevTools: migrate remote debugging protocol generators to jinja2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/V8StringUtil.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8StringUtil.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8StringUtil.cpp
index 344ef498ad6bf7d8e7a381b9afdb08e6d75f1d2e..69c92e4b799e29e64fe22da259c49667134cbc15 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8StringUtil.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8StringUtil.cpp
@@ -118,12 +118,12 @@ Vector<std::pair<int, String>> scriptRegexpMatchesByLines(const V8Regex& regex,
return result;
}
-PassRefPtr<protocol::TypeBuilder::Debugger::SearchMatch> buildObjectForSearchMatch(int lineNumber, const String& lineContent)
+PassOwnPtr<protocol::Debugger::SearchMatch> buildObjectForSearchMatch(int lineNumber, const String& lineContent)
{
- return protocol::TypeBuilder::Debugger::SearchMatch::create()
+ return protocol::Debugger::SearchMatch::create()
.setLineNumber(lineNumber)
.setLineContent(lineContent)
- .release();
+ .build();
}
PassOwnPtr<V8Regex> createSearchRegex(V8DebuggerImpl* debugger, const String& query, bool caseSensitive, bool isRegex)
@@ -173,16 +173,16 @@ String findSourceMapURL(const String& content, bool multiline, bool* deprecated)
return findMagicComment(content, "sourceMappingURL", multiline, deprecated);
}
-PassRefPtr<protocol::TypeBuilder::Array<protocol::TypeBuilder::Debugger::SearchMatch>> searchInTextByLines(V8Debugger* debugger, const String& text, const String& query, const bool caseSensitive, const bool isRegex)
+PassOwnPtr<protocol::Array<protocol::Debugger::SearchMatch>> searchInTextByLines(V8Debugger* debugger, const String& text, const String& query, const bool caseSensitive, const bool isRegex)
{
- RefPtr<protocol::TypeBuilder::Array<protocol::TypeBuilder::Debugger::SearchMatch>> result = protocol::TypeBuilder::Array<protocol::TypeBuilder::Debugger::SearchMatch>::create();
+ OwnPtr<protocol::Array<protocol::Debugger::SearchMatch>> result = protocol::Array<protocol::Debugger::SearchMatch>::create();
OwnPtr<V8Regex> regex = createSearchRegex(static_cast<V8DebuggerImpl*>(debugger), query, caseSensitive, isRegex);
Vector<std::pair<int, String>> matches = scriptRegexpMatchesByLines(*regex.get(), text);
for (const auto& match : matches)
result->addItem(buildObjectForSearchMatch(match.first, match.second));
- return result;
+ return result.release();
}
} // namespace V8ContentSearchUtil

Powered by Google App Engine
This is Rietveld 408576698