[SecureElement] Fixed implementation of Session.getATR().
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 21 May 2015 11:39:02 +0000 (13:39 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 21 May 2015 11:39:02 +0000 (13:39 +0200)
[Verification] TCT pass rate: 69/71.

Change-Id: Id1a74875647133dd9f0fd75c2f82fe6b8b1ba23f
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/secureelement/secureelement_api.js

index 380d49081c92ebdb69f6c08bc49f58f6b5dca0f7..1f7efeeac63472497ad4d07670f77bc218d7e8e6 100644 (file)
@@ -330,7 +330,12 @@ Session.prototype.openLogicalChannel = function() {
 Session.prototype.getATR = function() {
     xwalk.utils.checkPrivilegeAccess(privilege_.SECUREELEMENT);
     var callArgs = { handle: this._handle };
-    return native_.callSync('SESession_getATR', callArgs);
+    var result = native_.callSync('SESession_getATR', callArgs);
+    if (native_.isFailure(result)) {
+        throw native_.getErrorObject(result);
+    } else {
+        return native_.getResultObject(result);
+    }
 }
 
 Session.prototype.close = function() {