mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 997285 part 2. Add [ExceptionClass] support to WebIDL. r=peterv
This commit is contained in:
parent
953e8d707f
commit
ad342c8e55
@ -2328,6 +2328,8 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
|
|||||||
parentProtoType = "Rooted"
|
parentProtoType = "Rooted"
|
||||||
if self.descriptor.interface.getExtendedAttribute("ArrayClass"):
|
if self.descriptor.interface.getExtendedAttribute("ArrayClass"):
|
||||||
getParentProto = "aCx, JS_GetArrayPrototype(aCx, aGlobal)"
|
getParentProto = "aCx, JS_GetArrayPrototype(aCx, aGlobal)"
|
||||||
|
elif self.descriptor.interface.getExtendedAttribute("ExceptionClass"):
|
||||||
|
getParentProto = "aCx, JS_GetErrorPrototype(aCx)"
|
||||||
else:
|
else:
|
||||||
getParentProto = "aCx, JS_GetObjectPrototype(aCx, aGlobal)"
|
getParentProto = "aCx, JS_GetObjectPrototype(aCx, aGlobal)"
|
||||||
else:
|
else:
|
||||||
|
@ -968,6 +968,14 @@ class IDLInterface(IDLObjectWithScope):
|
|||||||
raise WebIDLError("[ArrayClass] must not be specified on "
|
raise WebIDLError("[ArrayClass] must not be specified on "
|
||||||
"an interface with inherited interfaces",
|
"an interface with inherited interfaces",
|
||||||
[attr.location, self.location])
|
[attr.location, self.location])
|
||||||
|
elif (identifier == "ExceptionClass"):
|
||||||
|
if not attr.noArguments():
|
||||||
|
raise WebIDLError("[ExceptionClass] must take no arguments",
|
||||||
|
[attr.location])
|
||||||
|
if self.parent:
|
||||||
|
raise WebIDLError("[ExceptionClass] must not be specified on "
|
||||||
|
"an interface with inherited interfaces",
|
||||||
|
[attr.location, self.location])
|
||||||
elif identifier == "Global":
|
elif identifier == "Global":
|
||||||
if not attr.noArguments():
|
if not attr.noArguments():
|
||||||
raise WebIDLError("[Global] must take no arguments",
|
raise WebIDLError("[Global] must take no arguments",
|
||||||
|
Loading…
Reference in New Issue
Block a user