From b8de65347868606e4372549fffd03e80cef1bb2e Mon Sep 17 00:00:00 2001 From: Rafal Galka Date: Mon, 12 Jan 2015 11:04:29 +0100 Subject: [PATCH] [Common] Async calls performed by sendSyncMessage [Message] This allows to handle exceptions thrown before async operation starts (eg. SecurityException). This patch replaces: http://168.219.209.56/gerrit/#/c/14446/ http://168.219.209.56/gerrit/#/c/14479/ Change-Id: Ifac6f168580fa4209741ff5f8b4f8a219820d7ef --- src/utils/utils_api.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/utils/utils_api.js b/src/utils/utils_api.js index 87c2f71b..87f189e9 100644 --- a/src/utils/utils_api.js +++ b/src/utils/utils_api.js @@ -778,12 +778,7 @@ NativeManager.prototype.call = function(cmd, args, callback) { args[this.CALLBACK_ID_KEY] = replyId; this.callbacks_[replyId] = callback; - var request = JSON.stringify({ - cmd: cmd, - args: args - }); - - this.extension.postMessage(request); + return this.callSync(cmd, args); }; NativeManager.prototype.callSync = function(cmd, args) { -- 2.34.1