mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1062107 - Fix system app listener removal. r=fabrice
This commit is contained in:
parent
3a05b506bd
commit
890a82a31b
@ -110,10 +110,10 @@ let SystemAppProxy = {
|
||||
if (content) {
|
||||
content.removeEventListener.apply(content, arguments);
|
||||
} else {
|
||||
let idx = this._pendingListeners.indexOf(listener);
|
||||
if (idx != -1) {
|
||||
this._pendingListeners.splice(idx, 1);
|
||||
}
|
||||
this._pendingListeners = this._pendingListeners.filter(
|
||||
args => {
|
||||
return args[0] != name || args[1] != listener;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -94,7 +94,7 @@ let steps = [
|
||||
// Ensure that listener being registered before the system app is ready
|
||||
// are correctly removed from the pending list
|
||||
function removedListener() {
|
||||
assert(false, "Listener isn't correctly removed from the pending list");
|
||||
assert.ok(false, "Listener isn't correctly removed from the pending list");
|
||||
}
|
||||
SystemAppProxy.addEventListener("mozChromeEvent", removedListener);
|
||||
SystemAppProxy.removeEventListener("mozChromeEvent", removedListener);
|
||||
|
Loading…
Reference in New Issue
Block a user