aboutsummaryrefslogtreecommitdiffstats
path: root/iPhone/CordovaLib/Classes/CDVCommandQueue.m
diff options
context:
space:
mode:
Diffstat (limited to 'iPhone/CordovaLib/Classes/CDVCommandQueue.m')
-rwxr-xr-xiPhone/CordovaLib/Classes/CDVCommandQueue.m17
1 files changed, 15 insertions, 2 deletions
diff --git a/iPhone/CordovaLib/Classes/CDVCommandQueue.m b/iPhone/CordovaLib/Classes/CDVCommandQueue.m
index a8a58b7..1a0dfa0 100755
--- a/iPhone/CordovaLib/Classes/CDVCommandQueue.m
+++ b/iPhone/CordovaLib/Classes/CDVCommandQueue.m
@@ -23,6 +23,14 @@
#import "CDVViewController.h"
#import "CDVCommandDelegateImpl.h"
+@interface CDVCommandQueue () {
+ NSInteger _lastCommandQueueFlushRequestId;
+ __weak CDVViewController* _viewController;
+ NSMutableArray* _queue;
+ BOOL _currentlyExecuting;
+}
+@end
+
@implementation CDVCommandQueue
@synthesize currentlyExecuting = _currentlyExecuting;
@@ -74,6 +82,9 @@
@"cordova.require('cordova/exec').nativeFetchMessages()"];
[self enqueCommandBatch:queuedCommandsJSON];
+ if ([queuedCommandsJSON length] > 0) {
+ CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by request.");
+ }
}
- (void)executePending
@@ -92,13 +103,15 @@
// Iterate over and execute all of the commands.
for (NSArray* jsonEntry in commandBatch) {
CDVInvokedUrlCommand* command = [CDVInvokedUrlCommand commandFromJson:jsonEntry];
+ CDV_EXEC_LOG(@"Exec(%@): Calling %@.%@", command.callbackId, command.className, command.methodName);
+
if (![self execute:command]) {
#ifdef DEBUG
NSString* commandJson = [jsonEntry JSONString];
static NSUInteger maxLogLength = 1024;
NSString* commandString = ([commandJson length] > maxLogLength) ?
- [NSString stringWithFormat:@"%@[...]", [commandJson substringToIndex:maxLogLength]] :
- commandJson;
+ [NSString stringWithFormat:@"%@[...]", [commandJson substringToIndex:maxLogLength]] :
+ commandJson;
DLog(@"FAILED pluginJSON = %@", commandString);
#endif