cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject ios commit: Fix NPE in InAppBrowser's error callback.
Date Mon, 25 Mar 2013 14:26:17 GMT
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 <agrieve@chromium.org>
Authored: Mon Mar 25 10:25:25 2013 -0400
Committer: Andrew Grieve <agrieve@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];
     }
 }
 


Mime
View raw message