mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +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()
|
identifier = attr.identifier()
|
||||||
value = attr.value()
|
value = attr.value()
|
||||||
if identifier == "TreatNullAs":
|
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 "
|
raise WebIDLError("[TreatNullAs] is only allowed on "
|
||||||
"arguments or attributes whose type is "
|
"arguments or attributes whose type is "
|
||||||
"DOMString",
|
"DOMString",
|
||||||
|
@ -398,7 +398,7 @@ class IDLObjectWithIdentifier(IDLObject):
|
||||||
[self.location])
|
[self.location])
|
||||||
self.treatNullAs = value
|
self.treatNullAs = value
|
||||||
elif identifier == "TreatUndefinedAs":
|
elif identifier == "TreatUndefinedAs":
|
||||||
if not self.type.isString():
|
if not self.type.isDOMString():
|
||||||
raise WebIDLError("[TreatUndefinedAs] is only allowed on "
|
raise WebIDLError("[TreatUndefinedAs] is only allowed on "
|
||||||
"arguments or attributes whose type is "
|
"arguments or attributes whose type is "
|
||||||
"DOMString or DOMString?",
|
"DOMString or DOMString?",
|
||||||
|
@ -3321,8 +3321,8 @@ class Parser(Tokenizer):
|
||||||
if len(arguments) != 0:
|
if len(arguments) != 0:
|
||||||
raise WebIDLError("stringifier has wrong number of arguments",
|
raise WebIDLError("stringifier has wrong number of arguments",
|
||||||
[self.getLocation(p, 2)])
|
[self.getLocation(p, 2)])
|
||||||
if not returnType.isString():
|
if not returnType.isDOMString():
|
||||||
raise WebIDLError("stringifier must have string return type",
|
raise WebIDLError("stringifier must have DOMString return type",
|
||||||
[self.getLocation(p, 2)])
|
[self.getLocation(p, 2)])
|
||||||
|
|
||||||
inOptionalArguments = False
|
inOptionalArguments = False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue