diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-05-01 20:56:10 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-05-01 20:56:10 +0200 |
commit | 0df5d95eb34d30747dcc010b1f2926c9de162f4f (patch) | |
tree | cb0ea294e1985cc0fe72774779c7b83be909b366 /src/components/script/dom/bindings/codegen/parser/WebIDL.py | |
parent | b501654a8a5ec6958ea71a4dc546c74f62a68c1f (diff) | |
download | servo-0df5d95eb34d30747dcc010b1f2926c9de162f4f.tar.gz servo-0df5d95eb34d30747dcc010b1f2926c9de162f4f.zip |
Change some isString() checks in the WebIDL parser to isDOMString() checks.
Diffstat (limited to 'src/components/script/dom/bindings/codegen/parser/WebIDL.py')
-rw-r--r-- | src/components/script/dom/bindings/codegen/parser/WebIDL.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/dom/bindings/codegen/parser/WebIDL.py b/src/components/script/dom/bindings/codegen/parser/WebIDL.py index cc8bec9d9ca..dc451001c52 100644 --- a/src/components/script/dom/bindings/codegen/parser/WebIDL.py +++ b/src/components/script/dom/bindings/codegen/parser/WebIDL.py @@ -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 |