From eca95f476ac8aa57f8a2d28832ae126f0764fc9f Mon Sep 17 00:00:00 2001 From: Edgar Chen Date: Fri, 19 Mar 2021 13:44:51 +0000 Subject: [PATCH] Bug 1697946 - Clean up IDL*Type's type check method; r=peterv We could remove the methods that are actually doing the same thing as its base class. Differential Revision: https://phabricator.services.mozilla.com/D103631 --- dom/bindings/parser/WebIDL.py | 66 ----------------------------------- 1 file changed, 66 deletions(-) diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py index 9bbcc5c48fd4..145629f41c72 100644 --- a/dom/bindings/parser/WebIDL.py +++ b/dom/bindings/parser/WebIDL.py @@ -2450,12 +2450,6 @@ class IDLType(IDLObject): type that is implemented in SpiderMonkey.""" return self.isInterface() and (self.isBufferSource() or self.isReadableStream()) - def isDictionary(self): - return False - - def isInterface(self): - return False - def isAny(self): return self.tag() == IDLType.Tags.any @@ -2791,45 +2785,12 @@ class IDLSequenceType(IDLParametrizedType): def prettyName(self): return "sequence<%s>" % self.inner.prettyName() - def nullable(self): - return False - - def isPrimitive(self): - return False - - def isString(self): - return False - - def isByteString(self): - return False - - def isDOMString(self): - return False - - def isUSVString(self): - return False - - def isUTF8String(self): - return False - - def isJSString(self): - return False - def isVoid(self): return False def isSequence(self): return True - def isDictionary(self): - return False - - def isInterface(self): - return False - - def isEnum(self): - return False - def isJSONType(self): return self.inner.isJSONType() @@ -3228,36 +3189,9 @@ class IDLWrapperType(IDLType): def __str__(self): return str(self.name) + " (Wrapper)" - def nullable(self): - return False - - def isPrimitive(self): - return False - - def isString(self): - return False - - def isByteString(self): - return False - - def isDOMString(self): - return False - - def isUSVString(self): - return False - - def isUTF8String(self): - return False - - def isJSString(self): - return False - def isVoid(self): return False - def isSequence(self): - return False - def isDictionary(self): return isinstance(self.inner, IDLDictionary)