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/04/27 01:54:32 UTC

ios commit: Re-fix CB-347 - localStorage / SQLDatabase Error after App update

Updated Branches:
  refs/heads/master 9b87baa60 -> 1fb9c0d9c


Re-fix CB-347 - localStorage / SQLDatabase Error after App update


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

Branch: refs/heads/master
Commit: 1fb9c0d9ce0dd0aadbba003e8d96feecf8dfd7b6
Parents: 9b87baa
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Apr 26 16:54:24 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Apr 26 16:54:24 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVViewController.m |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/1fb9c0d9/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 57ac48a..6cdcfaa 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -138,8 +138,14 @@
     } else {
         appURL = [NSURL fileURLWithPath:startFilePath];
     }
+    
+    //// Fix the iOS 5.1 SECURITY_ERR bug (CB-347), this must be before the webView is instantiated ////
+
+    [CDVLocalStorage __verifyAndFixDatabaseLocations];
+    
+    //// Instantiate the WebView ///////////////
 
-    [ self createGapView];
+    [self createGapView];
     
     ///////////////////
     
@@ -162,7 +168,7 @@
     }
     
     /*
-     * Fire up CDVLocalStorage to work-around iOS 5.1 WebKit storage bug limitations
+     * Fire up CDVLocalStorage to work-around iOS 5.1 WebKit storage limitations
      */
     [self.commandDelegate registerPlugin:[[[CDVLocalStorage alloc] initWithWebView:self.webView] autorelease] withClassName:NSStringFromClass([CDVLocalStorage class])];