mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 731746 part 3. Change JS-implemented webidl codegen to always invoke the parent constructor if there is a parent interface. r=mccr8
This commit is contained in:
parent
2f17e61fc4
commit
de9b7862dc
@ -8433,11 +8433,14 @@ class CGJSImplClass(CGBindingImplClass):
|
||||
parentInterface = descriptor.interface.parent
|
||||
while parentInterface:
|
||||
if parentInterface.isJSImplemented():
|
||||
baseConstructors = (
|
||||
[ "%s(aJSImplObject, aParent)" % parentClass ] +
|
||||
baseConstructors )
|
||||
baseConstructors.insert(
|
||||
0, "%s(aJSImplObject, aParent)" % parentClass )
|
||||
break
|
||||
parentInterface = parentInterface.parent
|
||||
if not parentInterface and descriptor.interface.parent:
|
||||
# We only have C++ ancestors, so only pass along the window
|
||||
baseConstructors.insert(0,
|
||||
"%s(aParent)" % parentClass)
|
||||
|
||||
constructor = ClassConstructor(
|
||||
[Argument("JSObject*", "aJSImplObject"),
|
||||
|
@ -26,6 +26,8 @@ class TestCImplementedInterface2 : public nsISupports,
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
TestCImplementedInterface2(nsPIDOMWindow* aParent)
|
||||
{}
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TestCImplementedInterface2)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user