Reader.prototype.closeSessions = function() {
xwalk.utils.checkPrivilegeAccess(privilege_.SECUREELEMENT);
var callArgs = { handle: this._handle };
- native_.call('SEReader_closeSessions', callArgs);
+ var result = native_.callSync('SEReader_closeSessions', callArgs);
+ if (native_.isFailure(result)) {
+ throw native_.getErrorObject(result);
+ }
};
//////////////////Channel/////////////////
isClosed: { configurable: false,
enumerable: true,
set: function() {},
- get: function() { var callArgs = { _handle: session_handle }; return native_.callSync('SESession_isClosed', callArgs); }},
+ get: function() {
+ var callArgs = { handle: session_handle };
+ var result = native_.callSync('SESession_isClosed', callArgs);
+ if (native_.isFailure(result)) {
+ console.log('SESession_isClosed error: ' + native_.getErrorObject(result));
+ return true;
+ } else {
+ return native_.getResultObject(result).isClosed;
+ }
+ }
+ },
_handle: { enumerable: false,
configurable: false,
set: function() {},