Closed
Bug 1141457
Opened 9 years ago
Closed 9 years ago
Refactor receiveMessage in Nfc.js
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(firefox39 fixed)
RESOLVED
FIXED
2.2 S12 (15may)
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
(Whiteboard: [p=1])
Attachments
(3 files)
3.81 KB,
patch
|
dimi
:
review+
|
Details | Diff | Splinter Review |
5.11 KB,
patch
|
dimi
:
review+
|
Details | Diff | Splinter Review |
3.03 KB,
patch
|
dimi
:
review+
|
Details | Diff | Splinter Review |
Make receiveMesssage easier in Nfc.js
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8575171 -
Flags: review?(dlee)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8575173 -
Flags: review?(dlee)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8575174 -
Flags: review?(dlee)
Updated•9 years ago
|
Attachment #8575171 -
Flags: review?(dlee) → review+
Updated•9 years ago
|
Attachment #8575173 -
Flags: review?(dlee) → review+
Comment 4•9 years ago
|
||
Comment on attachment 8575174 [details] [diff] [review] Part 3: add a CommandMsgTable. Review of attachment 8575174 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/nfc/gonk/Nfc.js @@ +96,5 @@ > +CommandMsgTable["NFC:ReadNDEF"] = NfcRequestType.READ_NDEF; > +CommandMsgTable["NFC:WriteNDEF"] = NfcRequestType.WRITE_NDEF; > +CommandMsgTable["NFC:MakeReadOnly"] = NfcRequestType.MAKE_READ_ONLY; > +CommandMsgTable["NFC:Format"] = NfcRequestType.FORMAT; > +CommandMsgTable["NFC:Transceive"] = NfcRequestType.TRANSCEIVE; I am not sure if overwrite a const dictionary after declaration works according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const No matter if it works i suggest we declare like this: const CommandMsgTable = { "NFC:ChangeRFState":NfcRequestType.CHANGE_RF_STATE, ... }
Attachment #8575174 -
Flags: review?(dlee) → review+
Comment 5•9 years ago
|
||
(In reply to Dimi Lee[:dimi][:dlee] from comment #4) > Comment on attachment 8575174 [details] [diff] [review] > Part 3: add a CommandMsgTable. > > Review of attachment 8575174 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/nfc/gonk/Nfc.js > @@ +96,5 @@ > > +CommandMsgTable["NFC:ReadNDEF"] = NfcRequestType.READ_NDEF; > > +CommandMsgTable["NFC:WriteNDEF"] = NfcRequestType.WRITE_NDEF; > > +CommandMsgTable["NFC:MakeReadOnly"] = NfcRequestType.MAKE_READ_ONLY; > > +CommandMsgTable["NFC:Format"] = NfcRequestType.FORMAT; > > +CommandMsgTable["NFC:Transceive"] = NfcRequestType.TRANSCEIVE; > > I am not sure if overwrite a const dictionary after declaration works > according to > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/ > const > > No matter if it works i suggest we declare like this: > const CommandMsgTable = { > "NFC:ChangeRFState":NfcRequestType.CHANGE_RF_STATE, > ... > } Forget this comment, const object could reassign its property
Assignee | ||
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/a8e070c7f67c https://hg.mozilla.org/integration/b2g-inbound/rev/13a7f7c81a18 https://hg.mozilla.org/integration/b2g-inbound/rev/dd4a99b9a08f
Whiteboard: [p=1]
Target Milestone: --- → 2.2 S12 (15may)
https://hg.mozilla.org/mozilla-central/rev/a8e070c7f67c https://hg.mozilla.org/mozilla-central/rev/13a7f7c81a18 https://hg.mozilla.org/mozilla-central/rev/dd4a99b9a08f
You need to log in
before you can comment on or make changes to this bug.
Description
•