Skip to content
Permalink
Browse files
CB-8468 - Application freezes if breakpoint hits JavaScript callback …
…invoked from native
  • Loading branch information
shazron committed May 29, 2015
1 parent 43c8d61 commit 796a18d425a03101a1a931c54cd8ea002230067c
Showing 1 changed file with 10 additions and 2 deletions.
@@ -301,11 +301,19 @@ iOSExec.nativeFetchMessages = function() {
return json;
};

iOSExec.nativeCallback = function(callbackId, status, message, keepCallback) {
iOSExec.nativeCallback = function(callbackId, status, message, keepCallback, debug) {
return iOSExec.nativeEvalAndFetch(function() {
var success = status === 0 || status === 1;
var args = convertMessageToArgsNativeToJs(message);
cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
function nc2() {
cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
}
// CB-8468
if (debug) {
setTimeout(nc2, 0);
} else {
nc2();
}
});
};

0 comments on commit 796a18d

Please sign in to comment.