mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 913950 - close all existing ports on worker termination. r=mixedpuppy
This commit is contained in:
parent
ac19e1b3bc
commit
907f1d969e
@ -127,12 +127,16 @@ WorkerHandle.prototype = {
|
||||
return;
|
||||
}
|
||||
delete workerCache[url];
|
||||
// close all the ports we have handed out.
|
||||
for (let [portid, port] of this._worker.ports) {
|
||||
port.close();
|
||||
}
|
||||
this._worker.ports.clear();
|
||||
this._worker.ports = null;
|
||||
this._worker.browserPromise.then(browser => {
|
||||
browser.parentNode.removeChild(browser);
|
||||
});
|
||||
// wipe things out just incase other reference have snuck out somehow...
|
||||
this._worker.ports.clear();
|
||||
this._worker.ports = null;
|
||||
this._worker.browserPromise = null;
|
||||
this._worker = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user