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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template

Issue 1745423002: DevTools: migrate protocol values from RefPtr to OwnPtr. (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/inspector_protocol/Frontend_cpp.template
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
index 6773e9b542aa455e9a6738fea66cdaad17ff017f..94041d33216a3c987cadbe0d7afeaee613598cb2 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
@@ -32,18 +32,18 @@ void Frontend::{{domain.domain}}::{{event.name}}(
{%- endif %} {{parameter.name}}{%- if not loop.last -%}, {% endif -%}
{% endfor -%})
{
- RefPtr<protocol::DictionaryValue> jsonMessage = DictionaryValue::create();
+ OwnPtr<protocol::DictionaryValue> jsonMessage = DictionaryValue::create();
jsonMessage->setString("method", "{{domain.domain}}.{{event.name}}");
- RefPtr<protocol::DictionaryValue> paramsObject = DictionaryValue::create();
+ OwnPtr<protocol::DictionaryValue> paramsObject = DictionaryValue::create();
{% for parameter in event.parameters %}
{% if "optional" in parameter %}
if ({{parameter.name}}.isJust())
paramsObject->setValue("{{parameter.name}}", toValue({{parameter.name}}.fromJust()));
{% else %}
- paramsObject->setValue("{{parameter.name}}", toValue({{parameter.name}}));
+ paramsObject->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).to_raw_type % parameter.name}}));
{% endif %}
{% endfor %}
- jsonMessage->setObject("params", paramsObject);
+ jsonMessage->setObject("params", paramsObject.release());
if (m_frontendChannel)
m_frontendChannel->sendProtocolNotification(jsonMessage.release());
}

Powered by Google App Engine
This is Rietveld 408576698