mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1047713, fix leak of SelectParentHelper, r=felipe
This commit is contained in:
parent
981147060c
commit
1d51395f1b
@ -47,6 +47,8 @@
|
|||||||
|
|
||||||
<field name="_controller">null</field>
|
<field name="_controller">null</field>
|
||||||
|
|
||||||
|
<field name="_selectParentHelper">null</field>
|
||||||
|
|
||||||
<field name="_remoteWebNavigation">null</field>
|
<field name="_remoteWebNavigation">null</field>
|
||||||
|
|
||||||
<property name="webNavigation"
|
<property name="webNavigation"
|
||||||
@ -307,10 +309,14 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "Forms:ShowDropDown": {
|
case "Forms:ShowDropDown": {
|
||||||
Cu.import("resource://gre/modules/SelectParentHelper.jsm");
|
if (!this._selectParentHelper) {
|
||||||
|
this._selectParentHelper =
|
||||||
|
Cu.import("resource://gre/modules/SelectParentHelper.jsm", {}).SelectParentHelper;
|
||||||
|
}
|
||||||
|
|
||||||
let menulist = document.getElementById(this.getAttribute("selectmenulist"));
|
let menulist = document.getElementById(this.getAttribute("selectmenulist"));
|
||||||
SelectParentHelper.populate(menulist, data.options, data.selectedIndex);
|
this._selectParentHelper.populate(menulist, data.options, data.selectedIndex);
|
||||||
SelectParentHelper.open(this, menulist, data.rect);
|
this._selectParentHelper.open(this, menulist, data.rect);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,9 +344,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "Forms:HideDropDown": {
|
case "Forms:HideDropDown": {
|
||||||
Cu.import("resource://gre/modules/SelectParentHelper.jsm");
|
if (this._selectParentHelper) {
|
||||||
let menulist = document.getElementById(this.getAttribute("selectmenulist"));
|
let menulist = document.getElementById(this.getAttribute("selectmenulist"));
|
||||||
SelectParentHelper.hide(menulist);
|
this._selectParentHelper.hide(menulist);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user