aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/BindingGen.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-12-16 21:06:37 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-12-16 21:06:37 +0530
commitd1ea209f0fb4951ee7cd773e448ee65968968d38 (patch)
treee878862f0dfae8d2e50b396f579f2bd60da8ec8d /components/script/dom/bindings/codegen/BindingGen.py
parent54a608b65e7ef117488640d5853390323e8f448f (diff)
parent2522cfe53942421892aa2c4741e7e9237db7c828 (diff)
downloadservo-d1ea209f0fb4951ee7cd773e448ee65968968d38.tar.gz
servo-d1ea209f0fb4951ee7cd773e448ee65968968d38.zip
Auto merge of #8996 - nox:rm-empty-modules, r=frewsxcv
Do not create modules from files with nothing to codegen (fixes #8711) Fixes #8711. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8996) <!-- Reviewable:end -->
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)