mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 874787. Add support for legacycaller on proxy bindings. r=efaust,peterv
This commit is contained in:
parent
64f553ecba
commit
847fc61450
@ -270,16 +270,18 @@ class CGDOMProxyJSClass(CGThing):
|
||||
def declare(self):
|
||||
return ""
|
||||
def define(self):
|
||||
callHook = LEGACYCALLER_HOOK_NAME if self.descriptor.operations["LegacyCaller"] else 'nullptr'
|
||||
return """
|
||||
static const DOMJSClass Class = {
|
||||
PROXY_CLASS_DEF("%s",
|
||||
0, /* extra slots */
|
||||
JSCLASS_IS_DOMJSCLASS,
|
||||
nullptr, /* call */
|
||||
%s, /* call */
|
||||
nullptr /* construct */),
|
||||
%s
|
||||
};
|
||||
""" % (self.descriptor.interface.identifier.name,
|
||||
callHook,
|
||||
CGIndenter(CGGeneric(DOMClass(self.descriptor))).define())
|
||||
|
||||
def PrototypeIDAndDepth(descriptor):
|
||||
|
@ -353,10 +353,6 @@ class Descriptor(DescriptorProvider):
|
||||
raise SyntaxError("%s supports named properties but does "
|
||||
"not have a named getter.\n%s" %
|
||||
(self.interface, self.interface.location))
|
||||
if operations['LegacyCaller']:
|
||||
raise SyntaxError("%s has a legacy caller but is a proxy; "
|
||||
"we don't support that yet.\n%s" %
|
||||
(self.interface, self.interface.location))
|
||||
iface = self.interface
|
||||
while iface:
|
||||
iface.setUserData('hasProxyDescendant', True)
|
||||
|
@ -967,6 +967,7 @@ public:
|
||||
uint32_t Item(uint32_t&);
|
||||
uint32_t Item(uint32_t, bool&) MOZ_DELETE;
|
||||
uint32_t Length();
|
||||
void LegacyCall(JS::Handle<JS::Value>);
|
||||
};
|
||||
|
||||
class TestNamedGetterInterface : public nsISupports,
|
||||
|
@ -876,6 +876,7 @@ dictionary DictForConstructor {
|
||||
interface TestIndexedGetterInterface {
|
||||
getter long item(unsigned long idx);
|
||||
readonly attribute unsigned long length;
|
||||
legacycaller void();
|
||||
};
|
||||
|
||||
interface TestNamedGetterInterface {
|
||||
|
Loading…
Reference in New Issue
Block a user