Closed Bug 997338 Opened 10 years ago Closed 10 years ago

NFC: Added null-check in fromUTF8() in shared/js/nfc_utils.js

Categories

(Firefox OS Graveyard :: NFC, defect)

defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
tracking-b2g backlog

People

(Reporter: kamituel, Assigned: kamituel)

References

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36



Actual results:

In gaia/shared/js/nfc_utils.js, comments for fromUTF8(str) and toUTF8(a) are mixed (reversed).
Please this into backlog.
blocking-b2g: --- → backlog
Assignee: nobody → kamituel
Attached file Fixes comments. (obsolete) —
Attachment #8411241 - Flags: review?(kchang)
Comment on attachment 8411241 [details] [review]
Fixes comments.

Alive, may you please help to have a review?
Attachment #8411241 - Flags: review?(kchang) → review?(alive)
Comment on attachment 8411241 [details] [review]
Fixes comments.

Thanks, but I prefer to use jsdoc format like
https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/app_window.js#L797
Could you do it?
Attachment #8411241 - Flags: review?(alive)
In addition to comment fixes, add null-check in fromUTF8() as well.
Attachment #8411241 - Attachment is obsolete: true
Attachment #8412177 - Flags: review?(alive)
Comment on attachment 8412177 [details] [review]
In addition to comment fixes, add null-check in fromUTF8() as well.

r+ if you assert the nullStr
Attachment #8412177 - Flags: review?(alive) → review+
Added assertion - I guess it's ready to be merged. Thanks!
Hi there, please amend your commit message to this format
"Bug XXXXXXX - WHAT_YOU_DO_TO_FIX_THIS_BUG"
You could see examples from git log.
Done.
I have fixed the comments in Bug 997075.
Perhaps Kami could help to add more checks comments in this bug.
Whiteboard: checkin-needed
(In reply to Yoshi Huang[:allstars.chh] from comment #10)
> I have fixed the comments in Bug 997075.
> Perhaps Kami could help to add more checks comments in this bug.

Sorry,
I thought Kami was trying to fix the typo which I fixed in Bug 997075, and I saw he added some JSDOC comments.
but I realize now he's adding the check in the other function, which is different from what I did.

Updating the subject of this bug for this.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: Invalid comments for fromUTF8() and toUTF8() methods in shared/js/nfc_utils.js → NFC: Added null-check in fromUTF8() in shared/js/nfc_utils.js
https://github.com/mozilla-b2g/gaia/commit/1ba9199d69f4621b78556ab0ce716c641728dffa
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: checkin-needed
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: