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

Unified Diff: mojo/public/tools/bindings/generators/mojom_js_generator.py

Issue 1572213002: Precompile mojom bindings generator jinja templates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: mojo/public/tools/bindings/generators/mojom_js_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_js_generator.py b/mojo/public/tools/bindings/generators/mojom_js_generator.py
index 638f1cb0a0134d9b9fba134b98c9d309d53ea68c..e9a488388d660868d149c5c88571d55b19e4efc5 100644
--- a/mojo/public/tools/bindings/generators/mojom_js_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_js_generator.py
@@ -380,7 +380,15 @@ class Generator(generator.Generator):
"imported_interfaces": self.GetImportedInterfaces(),
}
- @UseJinja("js_templates/module.amd.tmpl", filters=js_filters)
+ @staticmethod
+ def GetTemplatePrefix():
+ return "js_templates"
+
+ @classmethod
+ def GetFilters(cls):
+ return cls.js_filters
+
+ @UseJinja("module.amd.tmpl")
def GenerateAMDModule(self):
return self.GetParameters()

Powered by Google App Engine
This is Rietveld 408576698