mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 856819 part 2. Sort js-implemented interfaces in a given file so that the declarations in C++ come in the right order. r=mccr8
This commit is contained in:
parent
7879480d35
commit
33622efb8b
@ -1228,6 +1228,16 @@ DOMInterfaces = {
|
||||
'register': False
|
||||
},
|
||||
|
||||
'TestJSImplInterface5' : {
|
||||
'headerFile': 'TestJSImplGenBinding.h',
|
||||
'register': False
|
||||
},
|
||||
|
||||
'TestJSImplInterface6' : {
|
||||
'headerFile': 'TestJSImplGenBinding.h',
|
||||
'register': False
|
||||
},
|
||||
|
||||
'TestExternalInterface' : {
|
||||
'nativeType': 'mozilla::dom::TestExternalInterface',
|
||||
'headerFile': 'TestBindingHeader.h',
|
||||
|
@ -7325,7 +7325,12 @@ class CGBindingRoot(CGThing):
|
||||
cgthings.extend([CGCallbackInterface(x) for x in callbackDescriptors])
|
||||
|
||||
# Do codegen for JS implemented classes
|
||||
for x in jsImplemented:
|
||||
def getParentDescriptor(desc):
|
||||
if not desc.interface.parent:
|
||||
return set()
|
||||
return { desc.getDescriptor(desc.interface.parent.identifier.name) }
|
||||
for x in dependencySortObjects(jsImplemented, getParentDescriptor,
|
||||
lambda d: d.interface.identifier.name):
|
||||
cgthings.append(CGCallbackInterface(x))
|
||||
cgthings.append(CGJSImplClass(x))
|
||||
|
||||
|
@ -12,6 +12,18 @@ interface TestJSImplInterface2 : TestCImplementedInterface {
|
||||
interface TestJSImplInterface3 : TestCImplementedInterface2 {
|
||||
};
|
||||
|
||||
// Important: TestJSImplInterface5 needs to come before TestJSImplInterface6 in
|
||||
// this file to test what it's trying to test.
|
||||
[Constructor, JSImplementation="@mozilla.org/test-js-impl-interface5;1"]
|
||||
interface TestJSImplInterface5 : TestJSImplInterface6 {
|
||||
};
|
||||
|
||||
// Important: TestJSImplInterface6 needs to come after TestJSImplInterface3 in
|
||||
// this file to test what it's trying to test.
|
||||
[Constructor, JSImplementation="@mozilla.org/test-js-impl-interface6;1"]
|
||||
interface TestJSImplInterface6 : TestJSImplInterface3 {
|
||||
};
|
||||
|
||||
[Constructor, JSImplementation="@mozilla.org/test-js-impl-interface4;1"]
|
||||
interface TestJSImplInterface4 : EventTarget {
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user