You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2013/05/07 17:14:00 UTC

[13/50] [abbrv] webworks commit: Updating pluginResult to allow keeping callbacks while returning OK.

Updating pluginResult to allow keeping callbacks while returning OK.

Reviewed by Bryan Higgins <bh...@blackberry.com>


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/b4ee225e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/b4ee225e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/b4ee225e

Branch: refs/heads/future
Commit: b4ee225e0c688349049a6909c3d5d4c2b9cd15d7
Parents: a00b674
Author: Jeffrey Heifetz <jh...@rim.com>
Authored: Thu Mar 28 14:26:16 2013 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Fri May 3 10:13:29 2013 -0400

----------------------------------------------------------------------
 blackberry10/framework/lib/PluginResult.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/b4ee225e/blackberry10/framework/lib/PluginResult.js
----------------------------------------------------------------------
diff --git a/blackberry10/framework/lib/PluginResult.js b/blackberry10/framework/lib/PluginResult.js
index cbb57ff..7cae945 100644
--- a/blackberry10/framework/lib/PluginResult.js
+++ b/blackberry10/framework/lib/PluginResult.js
@@ -32,12 +32,12 @@ function PluginResult (args, env) {
         send({ code: CALLBACK_STATUS_NO_RESULT, keepCallback: !!keepCallback });
     };
 
-    this.error = function (msg) {
-        send({ code: CALLBACK_STATUS_ERROR, msg: msg, keepCallback: false });
+    this.error = function (msg, keepCallback) {
+        send({ code: CALLBACK_STATUS_ERROR, msg: msg, keepCallback: !!keepCallback });
     };
 
-    this.ok = function (data) {
-        send({ code: CALLBACK_STATUS_OK, data: data, keepCallback: false });
+    this.ok = function (data, keepCallback) {
+        send({ code: CALLBACK_STATUS_OK, data: data, keepCallback: !!keepCallback });
     };
 
     this.callbackOk = function (data, keepCallback) {