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 2013/07/16 02:49:03 UTC
ios commit: [CB-3530] PhoneGap app crashes on iOS with error
"CDVWebViewDelegate: Navigation started when state=1" (for navigation to an
anchor on the same page)
Updated Branches:
refs/heads/master 48b59457a -> 8050fda82
[CB-3530] PhoneGap app crashes on iOS with error "CDVWebViewDelegate: Navigation started when state=1" (for navigation to an anchor on the same page)
Moved error log to print only in the failure condition.
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/8050fda8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/8050fda8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/8050fda8
Branch: refs/heads/master
Commit: 8050fda8239a74875d3761ddcace718a62c00517
Parents: 48b5945
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Jul 15 17:48:53 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Jul 15 17:48:53 2013 -0700
----------------------------------------------------------------------
CordovaLib/Classes/CDVWebViewDelegate.m | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/8050fda8/CordovaLib/Classes/CDVWebViewDelegate.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVWebViewDelegate.m b/CordovaLib/Classes/CDVWebViewDelegate.m
index 8d5ec2a..fa1ecc7 100644
--- a/CordovaLib/Classes/CDVWebViewDelegate.m
+++ b/CordovaLib/Classes/CDVWebViewDelegate.m
@@ -234,11 +234,11 @@ typedef enum {
default:
{
- NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate: Navigation started when state=%d", _state];
- NSLog(@"%@", description);
_loadCount = 0;
_state = STATE_WAITING_FOR_LOAD_START;
if (![self request:request isFragmentIdentifierToRequest:webView.request]) {
+ NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate: Navigation started when state=%d", _state];
+ NSLog(@"%@", description);
if ([_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) {
NSDictionary* errorDictionary = @{NSLocalizedDescriptionKey : description};
NSError* error = [[NSError alloc] initWithDomain:@"CDVWebViewDelegate" code:1 userInfo:errorDictionary];