B2G NFC: Better logging in (un)RegisterPeerTarget

RESOLVED FIXED in 2.1 S3 (29aug)

Status

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: allstars.chh, Assigned: allstars.chh)

Tracking

unspecified
2.1 S3 (29aug)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [p=1])

Attachments

(3 attachments, 1 obsolete attachment)

Right now when app set onpeeready callback, we didn't show which appId registers this.

Also currentPeerAppId is set when checkP2PRegisterion, however I think it should be set in notifyUserAcceptedP2P.
Whiteboard: [good first bug]
I'll move handling currentPeerAppId in Bug 1055960.
Also I'd do the following renaming
1. rename msg[name] to message, as these unconsistent naming rule actually causes several typo.
2. rename message.json to message.data, as from http://lxr.mozilla.org/mozilla-central/source/content/base/public/nsIMessageManager.idl#185, the json field is deprecated.
Assignee: nobody → allstars.chh
Summary: B2G NFC: Betting logging in (un)RegisterPeerTarget and set currentPeerAppId properly → B2G NFC: Betting logging in (un)RegisterPeerTarget
Whiteboard: [good first bug]
Whiteboard: [p=1]
Target Milestone: --- → 2.1 S3 (29aug)
Attachment #8479749 - Flags: review?(dlee) → review+
Attachment #8479750 - Flags: review?(dlee) → review+
Comment on attachment 8479751 [details] [diff] [review]
Part 3: rename json to data.

Review of attachment 8479751 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks!
Attachment #8479751 - Flags: review?(dlee) → review+
Comment on attachment 8479749 [details] [diff] [review]
Part 1: add logging

Review of attachment 8479749 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/nfc/gonk/Nfc.js
@@ +484,3 @@
>     */
>    receiveMessage: function receiveMessage(message) {
> +    debug("Received '" + JSON.stringify(message) + "' message from gMessageManager");

this line should be removed since we already printed this in line 240.
Summary: B2G NFC: Betting logging in (un)RegisterPeerTarget → B2G NFC: Better logging in (un)RegisterPeerTarget
You need to log in before you can comment on or make changes to this bug.