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.
Created attachment 8528239 [details] [diff] [review] Patch v1 In this patch I treat |enable| as discovery mode because in listen mode NFC API should not be allowed.
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
Created attachment 8528274 [details] [diff] [review] Patch v2
Attachment #8528274 - Flags: review?(allstars.chh)
No longer depends on: 1095322
Attachment #8528274 - Flags: review?(allstars.chh) → review+
need to rebase since Bug 1085296 is landed.
Created attachment 8528978 [details] [diff] [review] Patch v3 rebase to latest code
Try link? :)
Created attachment 8529661 [details] [diff] [review] patch v4 rebase to latest code again.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.