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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl

Issue 1019173002: Update mojo sdk to rev 7214b7ec7d27563b2666afad86cf1c5895c56c18 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep permission service alive if embedder drops requests Created 5 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/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
index 308c8b67a5060845834470782594e599e915e6a6..44d1428d00340edc9472a5e6f2bcba0a5854eca5 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
@@ -116,13 +116,17 @@ class {{class_name}}_{{method.name}}_ProxyToResponder
public:
virtual ~{{class_name}}_{{method.name}}_ProxyToResponder() {
delete responder_;
+ // TODO(rudominer) DCHECK if |was_run_| is false and we don't have evidence
+ // that we are in a legitamte shutdown case such as the Connector detected
+ // an error or Close() was invoked.
}
{{class_name}}_{{method.name}}_ProxyToResponder(
uint64_t request_id,
mojo::MessageReceiver* responder)
: request_id_(request_id),
- responder_(responder) {
+ responder_(responder),
+ was_run_(false) {
}
virtual void Run({{interface_macros.declare_params("in_", method.response_parameters)}}) const override;
@@ -130,10 +134,12 @@ class {{class_name}}_{{method.name}}_ProxyToResponder
private:
uint64_t request_id_;
mutable mojo::MessageReceiver* responder_;
+ mutable bool was_run_;
MOJO_DISALLOW_COPY_AND_ASSIGN({{class_name}}_{{method.name}}_ProxyToResponder);
};
void {{class_name}}_{{method.name}}_ProxyToResponder::Run(
{{interface_macros.declare_params("in_", method.response_parameters)}}) const {
+ was_run_ = true;
{{struct_macros.get_serialized_size(response_params_struct, "in_%s")}}
mojo::internal::ResponseMessageBuilder builder(
{{message_name}}, size, request_id_);

Powered by Google App Engine
This is Rietveld 408576698