mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 796293 - no duplicate pages in registerPage() [r=fabrice]
This commit is contained in:
parent
17992eed74
commit
1f007d517d
@ -117,10 +117,23 @@ SystemMessageInternal.prototype = {
|
||||
throw Cr.NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
this._pages.push({ type: aType,
|
||||
uri: aPageURI.spec,
|
||||
manifest: aManifestURI.spec,
|
||||
pending: [] });
|
||||
let found = false;
|
||||
this._pages.some(function(aPage) {
|
||||
if (aPage.type == aType &&
|
||||
aPage.uri == aPageURI.spec &&
|
||||
aPage.manifest == aManifestURI.spec) {
|
||||
found = true;
|
||||
}
|
||||
|
||||
return found;
|
||||
});
|
||||
|
||||
if (!found) {
|
||||
this._pages.push({ type: aType,
|
||||
uri: aPageURI.spec,
|
||||
manifest: aManifestURI.spec,
|
||||
pending: [] });
|
||||
}
|
||||
},
|
||||
|
||||
receiveMessage: function receiveMessage(aMessage) {
|
||||
|
Loading…
Reference in New Issue
Block a user