mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1085301 - B2G NFC: Don't check sessionToken in notifyPeerFound. r=dimi
This commit is contained in:
parent
6e99c80f86
commit
5182b1a338
@ -200,14 +200,18 @@ MozNFCImpl.prototype = {
|
||||
return this._nfcContentHelper.powerOff();
|
||||
},
|
||||
|
||||
_createNFCPeer: function _createNFCPeer(sessionToken) {
|
||||
let peer = new MozNFCPeerImpl(this._window, sessionToken);
|
||||
return this._window.MozNFCPeer._create(this._window, peer);
|
||||
},
|
||||
|
||||
getNFCPeer: function getNFCPeer(sessionToken) {
|
||||
if (!sessionToken || !this._nfcContentHelper.checkSessionToken(sessionToken, true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!this.nfcPeer || this.nfcPeer.session != sessionToken) {
|
||||
let peer = new MozNFCPeerImpl(this._window, sessionToken);
|
||||
this.nfcPeer = this._window.MozNFCPeer._create(this._window, peer);
|
||||
this.nfcPeer = this._createNFCPeer();
|
||||
}
|
||||
|
||||
return this.nfcPeer;
|
||||
@ -307,7 +311,8 @@ MozNFCImpl.prototype = {
|
||||
}
|
||||
|
||||
this.session = sessionToken;
|
||||
let eventData = { "peer": this.getNFCPeer(sessionToken) };
|
||||
this.nfcPeer = this._createNFCPeer(sessionToken);
|
||||
let eventData = { "peer": this.nfcPeer };
|
||||
let type = (isPeerReady) ? "peerready" : "peerfound";
|
||||
|
||||
debug("fire on" + type + " " + sessionToken);
|
||||
|
Loading…
Reference in New Issue
Block a user