Bug 1186265 - Check the current interface's members. r=bz
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 23 May 2018 13:56:20 -0700
changeset 421817 3dc087521307d1abd85260df0851cf8c72f24a50
parent 421816 f485f658d19c5997f4eec963236b16c0c1a443a2
child 421818 4321a242f5f79de5ed5f37567a70bb38b0fe4ba4
push id104125
push useraciure@mozilla.com
push dateThu, 07 Jun 2018 21:57:03 +0000
treeherdermozilla-inbound@38c222c1bf73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1186265
milestone62.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 1186265 - Check the current interface's members. r=bz MozReview-Commit-ID: JJC82zi33YS
dom/bindings/parser/WebIDL.py
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -2820,17 +2820,17 @@ class IDLWrapperType(IDLType):
         return isinstance(self.inner, IDLEnum)
 
     def isJSONType(self):
         if self.isInterface():
             if self.inner.isExternal():
                 return False
             iface = self.inner
             while iface:
-                if any(m.isMethod() and m.isToJSON() for m in self.inner.members):
+                if any(m.isMethod() and m.isToJSON() for m in iface.members):
                     return True
                 iface = iface.parent
             return False
         elif self.isEnum():
             return True
         elif self.isDictionary():
             return all(m.type.isJSONType() for m in self.inner.members)
         else: