mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 909786 - Use incremental id as the hash key of |controlCallbacks|. r=vchang
This commit is contained in:
parent
f0b60832c5
commit
249cbee5b4
@ -456,9 +456,10 @@ NetworkManager.prototype = {
|
||||
|
||||
// Helpers
|
||||
|
||||
idgen: 0,
|
||||
controlMessage: function controlMessage(params, callback) {
|
||||
if (callback) {
|
||||
let id = callback.name;
|
||||
let id = this.idgen++;
|
||||
params.id = id;
|
||||
this.controlCallbacks[id] = callback;
|
||||
}
|
||||
@ -476,6 +477,7 @@ NetworkManager.prototype = {
|
||||
let callback = this.controlCallbacks[id];
|
||||
if (callback) {
|
||||
callback.call(this, response);
|
||||
delete this.controlCallbacks[id];
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user