You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/06/09 00:55:37 UTC

ios commit: Fixes CB-885 - Crash when sliding the notification tray and/or tel link confirm dialog

Updated Branches:
  refs/heads/master d8afe9b4a -> 27e83f748


Fixes CB-885 - Crash when sliding the notification tray and/or tel link confirm dialog


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/27e83f74
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/27e83f74
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/27e83f74

Branch: refs/heads/master
Commit: 27e83f748d8d8fe1f9c01bd7a18f09b95a33051e
Parents: d8afe9b
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Jun 8 15:55:31 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Jun 8 15:55:31 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVLocalStorage.m |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/27e83f74/CordovaLib/Classes/CDVLocalStorage.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocalStorage.m b/CordovaLib/Classes/CDVLocalStorage.m
index 10fd877..4d466ff 100644
--- a/CordovaLib/Classes/CDVLocalStorage.m
+++ b/CordovaLib/Classes/CDVLocalStorage.m
@@ -187,15 +187,14 @@
                 NSLog(@"%@", message);
                 
                 result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
-                [self writeJavascript:[result toSuccessCallbackString:callbackId]];
+                [self performSelectorOnMainThread:@selector(writeJavascript:) withObject:[result toSuccessCallbackString:callbackId] waitUntilDone:NO];
                 
             } else {
                 message = [NSString stringWithFormat:@"Error in CDVLocalStorage (%@) backup: %@", info.label, [error localizedDescription]];
                 NSLog(@"%@", message);
                 
                 result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:message];
-                [self writeJavascript:[result toErrorCallbackString:callbackId]];
-
+                [self performSelectorOnMainThread:@selector(writeJavascript:) withObject:[result toErrorCallbackString:callbackId] waitUntilDone:NO];
             }
         }
     }
@@ -221,15 +220,14 @@
                 NSLog(@"%@", message);
                 
                 result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
-                [self writeJavascript:[result toSuccessCallbackString:callbackId]];
+                [self performSelectorOnMainThread:@selector(writeJavascript:) withObject:[result toSuccessCallbackString:callbackId] waitUntilDone:NO];
                 
             } else {
                 message = [NSString stringWithFormat:@"Error in CDVLocalStorage (%@) restore: %@", info.label, [error localizedDescription]];
                 NSLog(@"%@", message);
                 
                 result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:message];
-                [self writeJavascript:[result toErrorCallbackString:callbackId]];
-                
+                [self performSelectorOnMainThread:@selector(writeJavascript:) withObject:[result toErrorCallbackString:callbackId] waitUntilDone:NO];
             }
         }
     }