aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/BindingGen.py
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/codegen/BindingGen.py')
-rw-r--r--components/script/dom/bindings/codegen/BindingGen.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/BindingGen.py b/components/script/dom/bindings/codegen/BindingGen.py
index 5debf3e1f0f..6b1f10c44e2 100644
--- a/components/script/dom/bindings/codegen/BindingGen.py
+++ b/components/script/dom/bindings/codegen/BindingGen.py
@@ -18,8 +18,10 @@ def generate_binding_rs(config, outputprefix, webidlfile):
"""
filename = outputprefix + ".rs"
- root = CGBindingRoot(config, outputprefix, webidlfile)
- if replaceFileIfChanged(filename, root.define()):
+ module = CGBindingRoot(config, outputprefix, webidlfile).define()
+ if not module:
+ print "Skipping empty module: %s" % (filename)
+ elif replaceFileIfChanged(filename, module):
print "Generating binding implementation: %s" % (filename)