You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2012/10/10 20:15:52 UTC
[2/3] ios commit: Fix commandDelegate.evalJs to actually bundle
exec() calls.
Fix commandDelegate.evalJs to actually bundle exec() calls.
It was not setting the isInContextOfEvalJs flag before executing the
code before.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/37113b13
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/37113b13
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/37113b13
Branch: refs/heads/master
Commit: 37113b13d016e2533462b8be9b6739898ddf7345
Parents: 7b4014c
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed Oct 10 14:12:22 2012 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Oct 10 14:12:22 2012 -0400
----------------------------------------------------------------------
CordovaLib/Classes/CDVCommandDelegateImpl.m | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/37113b13/CordovaLib/Classes/CDVCommandDelegateImpl.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCommandDelegateImpl.m b/CordovaLib/Classes/CDVCommandDelegateImpl.m
index 806a821..2cdf85f 100644
--- a/CordovaLib/Classes/CDVCommandDelegateImpl.m
+++ b/CordovaLib/Classes/CDVCommandDelegateImpl.m
@@ -67,7 +67,7 @@
// dead-lock.
// If the commandQueue is currently executing, then we know that it is safe to
// execute the callback immediately.
- // Using dispatch_async(dispatch_get_main_queue()) does *not* fix deadlocks for some reaon,
+ // Using (dispatch_get_main_queue()) does *not* fix deadlocks for some reaon,
// but performSelectorOnMainThread: does.
if (![NSThread isMainThread] || !_commandQueue.currentlyExecuting) {
[self performSelectorOnMainThread:@selector(evalJsHelper2:) withObject:js waitUntilDone:NO];
@@ -95,7 +95,7 @@
- (void)evalJs:(NSString*)js
{
- js = [js stringByAppendingString:@";cordova.require('cordova/exec').nativeFetchMessages()"];
+ js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})", js];
[self evalJsHelper:js];
}