зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
dc0c5d4ebc
Коммит
eca95f476a
|
@ -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)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче