cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [4/6] android commit: CB-7974 Cancel timeout timer if view is destroyed
Date Thu, 06 Nov 2014 20:49:28 GMT
CB-7974 Cancel timeout timer if view is destroyed


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

Branch: refs/heads/4.0.x
Commit: e78db000c611405ba35188fdf613b4d56f84516b
Parents: 032ea8a
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Nov 6 15:33:10 2014 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Nov 6 15:33:10 2014 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaWebView.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e78db000/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 0c62b76..4d01f58 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -783,6 +783,9 @@ public class CordovaWebView extends WebView {
     
     public void handleDestroy()
     {
+        // Cancel pending timeout timer.
+        loadUrlTimeout++;
+
         // Send destroy event to JavaScript
         this.loadUrl("javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){console.log('exception
firing destroy event from native');};");
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message