зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1578173 part 5. Remove vestigial binaryNames annotations from Bindings.conf. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D45393 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
14c30e58d6
Коммит
cdf754533a
|
@ -27,11 +27,6 @@
|
|||
# wrapping it the right IID needs to be passed in.
|
||||
# Only relevant for callback interfaces.
|
||||
# * register - True if this binding should be registered. Defaults to true.
|
||||
# * binaryNames - Dict for mapping method and attribute names to different
|
||||
# names when calling the native methods (defaults to an empty
|
||||
# dict). The keys are the property names as they appear in the
|
||||
# .webidl file and the values are the names as they should be
|
||||
# in the WebIDL.
|
||||
# * wrapperCache: True if this object is a wrapper cache. Objects that are
|
||||
# not can only be returned from a limited set of methods,
|
||||
# cannot be prefable, and must ensure that they disallow
|
||||
|
@ -445,10 +440,6 @@ DOMInterfaces = {
|
|||
'headerFile': 'DOMIntersectionObserver.h',
|
||||
},
|
||||
|
||||
'KeyboardEvent': {
|
||||
'binaryNames': { 'constructor': 'ConstructorJS' },
|
||||
},
|
||||
|
||||
'LegacyMozTCPSocket': {
|
||||
'headerFile': 'TCPSocket.h',
|
||||
'wrapperCache': False,
|
||||
|
@ -1525,9 +1516,6 @@ DOMInterfaces = {
|
|||
# Keep this in sync with TestExampleInterface
|
||||
'headerFile': 'TestBindingHeader.h',
|
||||
'register': False,
|
||||
'binaryNames': { 'methodRenamedFrom': 'methodRenamedTo',
|
||||
'attributeGetterRenamedFrom': 'attributeGetterRenamedTo',
|
||||
'attributeRenamedFrom': 'attributeRenamedTo' }
|
||||
},
|
||||
|
||||
'TestParentInterface' : {
|
||||
|
@ -1554,9 +1542,6 @@ DOMInterfaces = {
|
|||
# Keep this in sync with TestExampleInterface
|
||||
'headerFile': 'TestJSImplGenBinding.h',
|
||||
'register': False,
|
||||
'binaryNames': { 'methodRenamedFrom': 'methodRenamedTo',
|
||||
'attributeGetterRenamedFrom': 'attributeGetterRenamedTo',
|
||||
'attributeRenamedFrom': 'attributeRenamedTo' }
|
||||
},
|
||||
|
||||
'TestJSImplInterface2' : {
|
||||
|
@ -1717,9 +1702,6 @@ DOMInterfaces = {
|
|||
# Keep this in sync with TestInterface
|
||||
'headerFile': 'TestExampleInterface-example.h',
|
||||
'register': False,
|
||||
'binaryNames': { 'methodRenamedFrom': 'methodRenamedTo',
|
||||
'attributeGetterRenamedFrom': 'attributeGetterRenamedTo',
|
||||
'attributeRenamedFrom': 'attributeRenamedTo' }
|
||||
},
|
||||
|
||||
'TestExampleWorkerInterface' : {
|
||||
|
|
|
@ -561,23 +561,25 @@ class Descriptor(DescriptorProvider):
|
|||
for attribute in ['implicitJSContext']:
|
||||
addExtendedAttribute(attribute, desc.get(attribute, {}))
|
||||
|
||||
self._binaryNames = desc.get('binaryNames', {})
|
||||
self._binaryNames = {}
|
||||
|
||||
if not self.interface.isExternal():
|
||||
def isTestInterface(iface):
|
||||
return (iface.identifier.name in ["TestInterface",
|
||||
"TestJSImplInterface",
|
||||
"TestRenamedInterface"])
|
||||
|
||||
for member in self.interface.members:
|
||||
if not member.isAttr() and not member.isMethod():
|
||||
continue
|
||||
def maybeAddBinaryName(member):
|
||||
binaryName = member.getExtendedAttribute("BinaryName")
|
||||
if binaryName:
|
||||
assert isinstance(binaryName, list)
|
||||
assert len(binaryName) == 1
|
||||
self._binaryNames.setdefault(member.identifier.name,
|
||||
binaryName[0])
|
||||
for member in self.interface.members:
|
||||
if not member.isAttr() and not member.isMethod():
|
||||
continue
|
||||
maybeAddBinaryName(member);
|
||||
|
||||
ctor = self.interface.ctor()
|
||||
if ctor:
|
||||
maybeAddBinaryName(ctor)
|
||||
|
||||
# Some default binary names for cases when nothing else got set.
|
||||
self._binaryNames.setdefault('__legacycaller', 'LegacyCall')
|
||||
self._binaryNames.setdefault('__stringifier', 'Stringify')
|
||||
|
|
|
@ -893,13 +893,10 @@ class TestInterface : public nsISupports, public nsWrapperCache {
|
|||
|
||||
// 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&);
|
||||
|
|
|
@ -791,14 +791,14 @@ interface TestInterface {
|
|||
Promise<any> receiveAddrefedPromise();
|
||||
|
||||
// binaryNames tests
|
||||
[BinaryName="methodRenamedTo"]
|
||||
void methodRenamedFrom();
|
||||
[BinaryName="otherMethodRenamedTo"]
|
||||
void otherMethodRenamedFrom();
|
||||
[BinaryName="methodRenamedTo"]
|
||||
void methodRenamedFrom(byte argument);
|
||||
[BinaryName="attributeGetterRenamedTo"]
|
||||
readonly attribute byte attributeGetterRenamedFrom;
|
||||
[BinaryName="attributeRenamedTo"]
|
||||
attribute byte attributeRenamedFrom;
|
||||
[BinaryName="otherAttributeRenamedTo"]
|
||||
attribute byte otherAttributeRenamedFrom;
|
||||
|
||||
void passDictionary(optional Dict x = {});
|
||||
void passDictionary2(Dict x);
|
||||
|
|
|
@ -598,14 +598,14 @@ interface TestExampleInterface {
|
|||
Promise<any> receiveAddrefedPromise();
|
||||
|
||||
// binaryNames tests
|
||||
[BinaryName="methodRenamedTo"]
|
||||
void methodRenamedFrom();
|
||||
[BinaryName="otherMethodRenamedTo"]
|
||||
void otherMethodRenamedFrom();
|
||||
[BinaryName="methodRenamedTo"]
|
||||
void methodRenamedFrom(byte argument);
|
||||
[BinaryName="attributeGetterRenamedTo"]
|
||||
readonly attribute byte attributeGetterRenamedFrom;
|
||||
[BinaryName="attributeRenamedTo"]
|
||||
attribute byte attributeRenamedFrom;
|
||||
[BinaryName="otherAttributeRenamedTo"]
|
||||
attribute byte otherAttributeRenamedFrom;
|
||||
|
||||
void passDictionary(optional Dict x = {});
|
||||
void passDictionary2(Dict x);
|
||||
|
|
|
@ -612,14 +612,14 @@ interface TestJSImplInterface {
|
|||
Promise<any> receiveAddrefedPromise();
|
||||
|
||||
// binaryNames tests
|
||||
[BinaryName="methodRenamedTo"]
|
||||
void methodRenamedFrom();
|
||||
[BinaryName="otherMethodRenamedTo"]
|
||||
void otherMethodRenamedFrom();
|
||||
[BinaryName="methodRenamedTo"]
|
||||
void methodRenamedFrom(byte argument);
|
||||
[BinaryName="attributeGetterRenamedTo"]
|
||||
readonly attribute byte attributeGetterRenamedFrom;
|
||||
[BinaryName="attributeRenamedTo"]
|
||||
attribute byte attributeRenamedFrom;
|
||||
[BinaryName="otherAttributeRenamedTo"]
|
||||
attribute byte otherAttributeRenamedFrom;
|
||||
|
||||
void passDictionary(optional Dict x = {});
|
||||
void passDictionary2(Dict x);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
interface KeyboardEvent : UIEvent
|
||||
{
|
||||
[BinaryName="constructorJS"]
|
||||
constructor(DOMString typeArg,
|
||||
optional KeyboardEventInit keyboardEventInitDict= {});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче