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.
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
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.