Closed Bug 1093483 Opened 10 years ago Closed 9 years ago

Remove NFC_GECKO_ERROR_NOT_ENABLED error from Nfc.js

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: allstars.chh, Assigned: dimi)

References

Details

(Whiteboard: [p=1])

Attachments

(1 file, 3 obsolete files)

If an app calls NFC API (power API excluded, like startPoll, stopPoll or powerOff) when NFC HW is not enabled, this API should throw, right now we treat it as onerror in DOMRequest.
Assignee: nobody → dlee
Attached patch Patch v1 (obsolete) — Splinter Review
In this patch I treat |enable| as discovery mode because in listen mode NFC API should not be allowed.
Attachment #8528239 - Flags: review?(allstars.chh)
Attachment #8528239 - Attachment is obsolete: true
Attachment #8528239 - Flags: review?(allstars.chh)
Summary: Calling NFC API when NFC is not enabled should throw → Remove NOT_ENABLED error from Nfc.js
Summary: Remove NOT_ENABLED error from Nfc.js → Remove NFC_GECKO_ERROR_NOT_ENABLED error from Nfc.js
In child process we will check |isLost| attribute to determine if tag/peer API is callable.
So check is enable in Nfc.js is not necessary
Attached patch Patch v2 (obsolete) — Splinter Review
Attachment #8528274 - Flags: review?(allstars.chh)
Attachment #8528274 - Flags: review?(allstars.chh) → review+
Keywords: checkin-needed
Whiteboard: [p=1]
need to rebase since Bug 1085296 is landed.
Keywords: checkin-needed
Attached patch Patch v3 (obsolete) — Splinter Review
rebase to latest code
Attachment #8528274 - Attachment is obsolete: true
Attachment #8528978 - Flags: review+
Keywords: checkin-needed
Try link? :)
Keywords: checkin-needed
Attached patch patch v4Splinter Review
rebase to latest code again.
Attachment #8528978 - Attachment is obsolete: true
Attachment #8529661 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/5bbffe503f7b
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.