mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 958887 part 1. Add support for doing BinaryName annotations in IDL. r=peterv
This commit is contained in:
parent
abb6120f93
commit
b959467c6e
@ -470,6 +470,16 @@ class Descriptor(DescriptorProvider):
|
||||
m.getExtendedAttribute("AvailableIn") == "PrivilegedApps"):
|
||||
self.featureDetectibleThings.add("%s.%s" % (self.interface.identifier.name, m.identifier.name))
|
||||
|
||||
for member in self.interface.members:
|
||||
if not member.isAttr() and not member.isMethod():
|
||||
continue
|
||||
binaryName = member.getExtendedAttribute("BinaryName")
|
||||
if binaryName:
|
||||
assert isinstance(binaryName, list)
|
||||
assert len(binaryName) == 1
|
||||
self._binaryNames.setdefault(member.identifier.name,
|
||||
binaryName[0])
|
||||
|
||||
# Build the prototype chain.
|
||||
self.prototypeChain = []
|
||||
parent = interface
|
||||
|
@ -3362,7 +3362,8 @@ class IDLAttribute(IDLInterfaceMember):
|
||||
identifier == "AvailableIn" or
|
||||
identifier == "NewObject" or
|
||||
identifier == "UnsafeInPrerendering" or
|
||||
identifier == "CheckPermissions"):
|
||||
identifier == "CheckPermissions" or
|
||||
identifier == "BinaryName"):
|
||||
# Known attributes that we don't need to do anything with here
|
||||
pass
|
||||
else:
|
||||
@ -3963,7 +3964,8 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
|
||||
identifier == "Pref" or
|
||||
identifier == "Func" or
|
||||
identifier == "AvailableIn" or
|
||||
identifier == "CheckPermissions"):
|
||||
identifier == "CheckPermissions" or
|
||||
identifier == "BinaryName"):
|
||||
# Known attributes that we don't need to do anything with here
|
||||
pass
|
||||
else:
|
||||
|
@ -689,10 +689,13 @@ public:
|
||||
|
||||
// binaryNames tests
|
||||
void MethodRenamedTo();
|
||||
void OtherMethodRenamedTo();
|
||||
void MethodRenamedTo(int8_t);
|
||||
int8_t AttributeGetterRenamedTo();
|
||||
int8_t AttributeRenamedTo();
|
||||
void SetAttributeRenamedTo(int8_t);
|
||||
int8_t OtherAttributeRenamedTo();
|
||||
void SetOtherAttributeRenamedTo(int8_t);
|
||||
|
||||
// Dictionary tests
|
||||
void PassDictionary(JSContext*, const Dict&);
|
||||
|
@ -656,9 +656,13 @@ interface TestInterface {
|
||||
|
||||
// binaryNames tests
|
||||
void methodRenamedFrom();
|
||||
[BinaryName="otherMethodRenamedTo"]
|
||||
void otherMethodRenamedFrom();
|
||||
void methodRenamedFrom(byte argument);
|
||||
readonly attribute byte attributeGetterRenamedFrom;
|
||||
attribute byte attributeRenamedFrom;
|
||||
[BinaryName="otherAttributeRenamedTo"]
|
||||
attribute byte otherAttributeRenamedFrom;
|
||||
|
||||
void passDictionary(optional Dict x);
|
||||
[Cached, Pure]
|
||||
|
@ -520,9 +520,13 @@ interface TestExampleInterface {
|
||||
|
||||
// binaryNames tests
|
||||
void methodRenamedFrom();
|
||||
[BinaryName="otherMethodRenamedTo"]
|
||||
void otherMethodRenamedFrom();
|
||||
void methodRenamedFrom(byte argument);
|
||||
readonly attribute byte attributeGetterRenamedFrom;
|
||||
attribute byte attributeRenamedFrom;
|
||||
[BinaryName="otherAttributeRenamedTo"]
|
||||
attribute byte otherAttributeRenamedFrom;
|
||||
|
||||
void passDictionary(optional Dict x);
|
||||
[Cached, Pure]
|
||||
|
@ -536,9 +536,13 @@ interface TestJSImplInterface {
|
||||
|
||||
// binaryNames tests
|
||||
void methodRenamedFrom();
|
||||
[BinaryName="otherMethodRenamedTo"]
|
||||
void otherMethodRenamedFrom();
|
||||
void methodRenamedFrom(byte argument);
|
||||
readonly attribute byte attributeGetterRenamedFrom;
|
||||
attribute byte attributeRenamedFrom;
|
||||
[BinaryName="otherAttributeRenamedTo"]
|
||||
attribute byte otherAttributeRenamedFrom;
|
||||
|
||||
void passDictionary(optional Dict x);
|
||||
[Cached, Pure]
|
||||
|
Loading…
Reference in New Issue
Block a user