mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 930967 - Follow-up to fix mistake in test suite that lead to intermittent failures r=me
From 7531ffe0cfebf5296b063538922c12fb83bfb8f7 Mon Sep 17 00:00:00 2001
This commit is contained in:
parent
9b8de13fb1
commit
a9bef43543
@ -191,20 +191,20 @@ function promiseContentMessage(browser, name, timeout = 1000) {
|
||||
mm.removeMessageListener(name, listener);
|
||||
}
|
||||
|
||||
let timeout = setTimeout(function () {
|
||||
let timeoutID = setTimeout(function () {
|
||||
removeListener();
|
||||
deferred.resolve(false);
|
||||
}, timeout);
|
||||
|
||||
function listener(msg) {
|
||||
removeListener();
|
||||
clearTimeout(timeout);
|
||||
clearTimeout(timeoutID);
|
||||
deferred.resolve(msg);
|
||||
}
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
removeListener();
|
||||
clearTimeout(timeout);
|
||||
clearTimeout(timeoutID);
|
||||
});
|
||||
|
||||
mm.addMessageListener(name, listener);
|
||||
|
Loading…
Reference in New Issue
Block a user