Bug 1268798 part 1 - Fix exception whitelist in WebIDL parser. r?khuey draft
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 05 May 2016 20:31:26 +1000
changeset 363676 51683f8ccec315cda30ec4f776f888e1b9e3941d
parent 363637 4f6b3a0bc2b17f9396b3fe05d30a8ae10893f2ab
child 363677 5bbdb0e996c29867a16e59747d64f4947bf0af93
push id17285
push userxquan@mozilla.com
push dateThu, 05 May 2016 10:34:05 +0000
reviewerskhuey
bugs1268798
milestone49.0a1
Bug 1268798 part 1 - Fix exception whitelist in WebIDL parser. r?khuey MozReview-Commit-ID: 5rBXjHgQuGd
dom/bindings/parser/WebIDL.py
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -5130,20 +5130,21 @@ class SqueakyCleanLogger(object):
     def __init__(self):
         self.errors = []
 
     def debug(self, msg, *args, **kwargs):
         pass
     info = debug
 
     def warning(self, msg, *args, **kwargs):
-        if msg == "%s:%d: Rule '%s' defined, but not used":
+        if msg == "%s:%d: Rule %r defined, but not used" or \
+           msg == "%s:%d: Rule '%s' defined, but not used":
             # Munge things so we don't have to hardcode filenames and
             # line numbers in our whitelist.
-            whitelistmsg = "Rule '%s' defined, but not used"
+            whitelistmsg = "Rule %r defined, but not used"
             whitelistargs = args[2:]
         else:
             whitelistmsg = msg
             whitelistargs = args
         if (whitelistmsg % whitelistargs) not in SqueakyCleanLogger.errorWhitelist:
             self.errors.append(msg % args)
     error = warning