Bug 993896 - Fire success / error to dom requests based on status received from gonk. r=allstars.chh

This commit is contained in:
Siddartha Pothapragada 2014-04-08 23:17:53 -07:00
parent c87170c5cf
commit f71172786b

View File

@ -372,7 +372,11 @@ NfcContentHelper.prototype = {
case "NFC:MakeReadOnlyNDEFResponse":
case "NFC:CheckP2PRegistrationResponse":
case "NFC:NotifySendFileStatusResponse":
this.fireRequestSuccess(atob(result.requestId), result);
if (result.status !== NFC.GECKO_NFC_ERROR_SUCCESS) {
this.fireRequestError(atob(result.requestId), result.status);
} else {
this.fireRequestSuccess(atob(result.requestId), result);
}
break;
case "NFC:PeerEvent":
let callback = this.peerEventsCallbackMap[result.event];