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 2013/03/25 15:26:17 UTC

ios commit: Fix NPE in InAppBrowser's error callback.

Updated Branches:
  refs/heads/master 452db1566 -> 40c98b8b7


Fix NPE in InAppBrowser's error callback.

Reprocudes using the mobile spec's test page.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/40c98b8b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/40c98b8b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/40c98b8b

Branch: refs/heads/master
Commit: 40c98b8b717512d1ed7c96419a5b392757de0776
Parents: 452db15
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Mar 25 10:25:25 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Mar 25 10:25:25 2013 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVInAppBrowser.m |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/40c98b8b/CordovaLib/Classes/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVInAppBrowser.m b/CordovaLib/Classes/CDVInAppBrowser.m
index edc7661..dcbb2f4 100644
--- a/CordovaLib/Classes/CDVInAppBrowser.m
+++ b/CordovaLib/Classes/CDVInAppBrowser.m
@@ -458,7 +458,7 @@
     [self.spinner startAnimating];
 }
 
-- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
+- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
 {
     if ((self.navigationDelegate != nil) && [self.navigationDelegate respondsToSelector:@selector(browserLoadStart:)]) {
         NSURL* url = request.URL;
@@ -497,8 +497,7 @@
     }
 
     if ((self.navigationDelegate != nil) && [self.navigationDelegate respondsToSelector:@selector(browserLoadStop:)]) {
-        NSURL* url = theWebView.request.URL;
-        [self.navigationDelegate browserLoadStop:url];
+        [self.navigationDelegate browserLoadStop:_requestedURL];
     }
 }
 
@@ -514,8 +513,7 @@
     self.addressLabel.text = @"Load Error";
 
     if ((self.navigationDelegate != nil) && [self.navigationDelegate respondsToSelector:@selector(browserLoadError:forUrl:)]) {
-        NSURL* url = theWebView.request.URL;
-        [self.navigationDelegate browserLoadError:error forUrl:url];
+        [self.navigationDelegate browserLoadError:error forUrl:_requestedURL];
     }
 }