Bug 1550545, part 4 - Don't generate the scriptable flag in XPT files. r=nika
authorAndrew McCreight <continuation@gmail.com>
Thu, 09 May 2019 22:07:52 +0000
changeset 532138 e93a97c6e708cd67d514574a14a611ca516906b4
parent 532137 8095cb5a0964634f1905cafb714a33a8c7fbbd5f
child 532139 7fbf58d80879cbf94f82bddddb747bdfb9e4caa4
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1550545
milestone68.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 1550545, part 4 - Don't generate the scriptable flag in XPT files. r=nika We never emit an XPT for an interface that is not scriptable, so this flag is never used. Differential Revision: https://phabricator.services.mozilla.com/D30529
xpcom/idl-parser/xpidl/jsonxpt.py
--- a/xpcom/idl-parser/xpidl/jsonxpt.py
+++ b/xpcom/idl-parser/xpidl/jsonxpt.py
@@ -153,16 +153,18 @@ def attr_param_idx(p, m, attr):
                 return i
         return None
 
 
 def build_interface(iface):
     if iface.namemap is None:
         raise Exception("Interface was not resolved.")
 
+    assert iface.attributes.scriptable, "Don't generate XPT info for non-scriptable interfaces"
+
     # State used while building an interface
     consts = []
     methods = []
 
     def build_const(c):
         consts.append({
             'name': c.name,
             'type': get_type(c.basetype, ''),
@@ -229,17 +231,16 @@ def build_interface(iface):
 
     return {
         'name': iface.name,
         'uuid': iface.attributes.uuid,
         'methods': methods,
         'consts': consts,
         'parent': iface.base,
         'flags': flags(
-            ('scriptable', iface.attributes.scriptable),
             ('function', iface.attributes.function),
             ('builtinclass', iface.attributes.builtinclass or iface.implicit_builtinclass),
             ('main_process_only', iface.attributes.main_process_scriptable_only),
         )
     }
 
 
 # These functions are the public interface of this module. They are very simple