Closed
Bug 1085301
Opened 11 years ago
Closed 11 years ago
B2G NFC: checking sessionToken in notifyPeerReady is unneccesary.
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S8 (7Nov)
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
(Whiteboard: [p=1])
Attachments
(1 file, 1 obsolete file)
|
2.10 KB,
patch
|
allstars.chh
:
review+
|
Details | Diff | Splinter Review |
In notifyPeerReady from nsNfc.js it will call getNFCPeer to get the peer object, however the getNFCPeer will also do the session check, which is not neccesary.
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → allstars.chh
| Assignee | ||
Comment 1•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
Attachment #8517173 -
Flags: review?(dlee)
Comment 2•11 years ago
|
||
Comment on attachment 8517173 [details] [diff] [review]
Patch
Review of attachment 8517173 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/nfc/nsNfc.js
@@ +202,5 @@
>
> + _createNFCPeer: function _createNFCPeer(sessionToken) {
> + let peer = new MozNFCPeerImpl(this._window, sessionToken);
> + this.nfcPeer = this._window.MozNFCPeer._create(this._window, peer);
> + return this.nfcPeer;
_createNFCPeer is a private function of mozNfc and this function set both |this.ncPeer| member variable and return this member variable.
I think it would be better just:
return this._window.MozNFCPeer._create(this._window, peer);
Attachment #8517173 -
Flags: review?(dlee) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
move assigning this.nfcPeer outside.
Attachment #8517173 -
Attachment is obsolete: true
Attachment #8517263 -
Flags: review+
| Assignee | ||
Comment 4•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
Whiteboard: [p=1]
Target Milestone: --- → 2.1 S8 (7Nov)
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•