Bug 338865 - Scriptable XPIDL iface inheriting from noscript iface should throw error. r=froydnj
authorAndrew McCreight <continuation@gmail.com>
Tue, 12 Sep 2017 15:03:14 -0700
changeset 430107 f636dde157b801154bf533713d049eac8c7f91c8
parent 430106 b01eb1d915f8bc229c7f1cc43b606968ed56d8af
child 430108 0e2f8ba6e45cede6d1a5586b6d0b9c636ae9b960
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs338865
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 338865 - Scriptable XPIDL iface inheriting from noscript iface should throw error. r=froydnj MozReview-Commit-ID: H6sF4Poz2V0
xpcom/idl-parser/xpidl/xpidl.py
--- a/xpcom/idl-parser/xpidl/xpidl.py
+++ b/xpcom/idl-parser/xpidl/xpidl.py
@@ -524,17 +524,17 @@ class Interface(object):
 
         parent.setName(self)
         if self.base is not None:
             realbase = parent.getName(self.base, self.location)
             if realbase.kind != 'interface':
                 raise IDLError("interface '%s' inherits from non-interface type '%s'" % (self.name, self.base), self.location)
 
             if self.attributes.scriptable and not realbase.attributes.scriptable:
-                print >>sys.stderr, IDLError("interface '%s' is scriptable but derives from non-scriptable '%s'" % (self.name, self.base), self.location, warning=True)
+                raise IDLError("interface '%s' is scriptable but derives from non-scriptable '%s'" % (self.name, self.base), self.location, warning=True)
 
             if self.attributes.scriptable and realbase.attributes.builtinclass and not self.attributes.builtinclass:
                 raise IDLError("interface '%s' is not builtinclass but derives from builtinclass '%s'" % (self.name, self.base), self.location)
 
         for member in self.members:
             member.resolve(self)
 
         # The number 250 is NOT arbitrary; this number is the maximum number of