diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py index dc0e0f00ea36..a1283c7b436f 100644 --- a/dom/bindings/parser/WebIDL.py +++ b/dom/bindings/parser/WebIDL.py @@ -2712,6 +2712,14 @@ class IDLAttribute(IDLInterfaceMember): if self.isStatic(): raise WebIDLError("[LenientThis] is only allowed on non-static " "attributes", [attr.location, self.location]) + if self.getExtendedAttribute("CrossOriginReadable"): + raise WebIDLError("[LenientThis] is not allowed in combination " + "with [CrossOriginReadable]", + [attr.location, self.location]) + if self.getExtendedAttribute("CrossOriginWritable"): + raise WebIDLError("[LenientThis] is not allowed in combination " + "with [CrossOriginWritable]", + [attr.location, self.location]) self.lenientThis = True elif identifier == "Unforgeable": if not self.readonly: @@ -2774,6 +2782,19 @@ class IDLAttribute(IDLInterfaceMember): raise WebIDLError("[Cached] and [StoreInSlot] must not be " "specified on the same attribute", [attr.location, self.location]) + elif (identifier == "CrossOriginReadable" or + identifier == "CrossOriginWritable"): + if not attr.noArguments(): + raise WebIDLError("[%s] must take no arguments" % identifier, + [attr.location]) + if self.isStatic(): + raise WebIDLError("[%s] is only allowed on non-static " + "attributes" % identifier, + [attr.location, self.location]) + if self.getExtendedAttribute("LenientThis"): + raise WebIDLError("[LenientThis] is not allowed in combination " + "with [%s]" % identifier, + [attr.location, self.location]) elif (identifier == "Pref" or identifier == "SetterThrows" or identifier == "Pure" or @@ -3322,6 +3343,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope): identifier == "Pref" or identifier == "Func" or identifier == "Pure" or + identifier == "CrossOriginCallable" or identifier == "WebGLHandlesContextLoss"): # Known attributes that we don't need to do anything with here pass