mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Change some isString() checks in the WebIDL parser to isDOMString() checks.
This commit is contained in:
parent
b501654a8a
commit
0df5d95eb3
1 changed files with 4 additions and 4 deletions
|
@ -384,7 +384,7 @@ class IDLObjectWithIdentifier(IDLObject):
|
|||
identifier = attr.identifier()
|
||||
value = attr.value()
|
||||
if identifier == "TreatNullAs":
|
||||
if not self.type.isString() or self.type.nullable():
|
||||
if not self.type.isDOMString() or self.type.nullable():
|
||||
raise WebIDLError("[TreatNullAs] is only allowed on "
|
||||
"arguments or attributes whose type is "
|
||||
"DOMString",
|
||||
|
@ -398,7 +398,7 @@ class IDLObjectWithIdentifier(IDLObject):
|
|||
[self.location])
|
||||
self.treatNullAs = value
|
||||
elif identifier == "TreatUndefinedAs":
|
||||
if not self.type.isString():
|
||||
if not self.type.isDOMString():
|
||||
raise WebIDLError("[TreatUndefinedAs] is only allowed on "
|
||||
"arguments or attributes whose type is "
|
||||
"DOMString or DOMString?",
|
||||
|
@ -3321,8 +3321,8 @@ class Parser(Tokenizer):
|
|||
if len(arguments) != 0:
|
||||
raise WebIDLError("stringifier has wrong number of arguments",
|
||||
[self.getLocation(p, 2)])
|
||||
if not returnType.isString():
|
||||
raise WebIDLError("stringifier must have string return type",
|
||||
if not returnType.isDOMString():
|
||||
raise WebIDLError("stringifier must have DOMString return type",
|
||||
[self.getLocation(p, 2)])
|
||||
|
||||
inOptionalArguments = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue