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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/data.py

Issue 1454113003: Require an explicit ServiceName annotation for interfaces in C++. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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: mojo/public/tools/bindings/pylib/mojom/generate/data.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/data.py b/mojo/public/tools/bindings/pylib/mojom/generate/data.py
index dfc23f1d743d5670b924f262945136a307bc1e0c..fad8fbc8fac0e11da841ed3fa9a8480053fcce1c 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/data.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/data.py
@@ -358,6 +358,9 @@ def InterfaceFromData(module, data):
# Stash methods data here temporarily.
interface.methods_data = data['methods']
interface.attributes = data.get('attributes')
+ interface.service_name = None
+ if interface.attributes:
+ interface.service_name = interface.attributes.get('ServiceName')
return interface
def EnumFieldFromData(module, enum, data, parent_kind):

Powered by Google App Engine
This is Rietveld 408576698