mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 695235 - enforce unsigned long type on size_is parameters; r=khuey
This commit is contained in:
parent
3b8fa0ab19
commit
d0255ba171
@ -919,6 +919,16 @@ class Method(object):
|
||||
raise IDLError("'stringifier' attribute can only be used on methods returning DOMString",
|
||||
self.location)
|
||||
self.iface.ops['stringifier'] = self
|
||||
for p in self.params:
|
||||
if p.size_is:
|
||||
found_size_param = False
|
||||
for size_param in self.params:
|
||||
if p.size_is == size_param.name:
|
||||
found_size_param = True
|
||||
if getBuiltinOrNativeTypeName(size_param.realtype) != 'unsigned long':
|
||||
raise IDLError("is_size parameter must have type 'unsigned long'", self.location)
|
||||
if not found_size_param:
|
||||
raise IDLError("could not find is_size parameter '%s'" % p.size_is, self.location)
|
||||
|
||||
def isScriptable(self):
|
||||
if not self.iface.attributes.scriptable: return False
|
||||
|
Loading…
Reference in New Issue
Block a user