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 2014/11/06 21:49:28 UTC

[4/6] android commit: CB-7974 Cancel timeout timer if view is destroyed

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 <ag...@chromium.org>
Authored: Thu Nov 6 15:33:10 2014 -0500
Committer: Andrew Grieve <ag...@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