You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by na...@apache.org on 2014/11/22 20:39:06 UTC

[2/3] cordova-amazon-fireos git 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-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/181bf856
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/181bf856
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/181bf856

Branch: refs/heads/master
Commit: 181bf856361297d8dcc595a043bf8b0ec43aa88e
Parents: db508a2
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Nov 6 15:33:10 2014 -0500
Committer: Ajitha <aj...@amazon.com>
Committed: Mon Nov 17 00:34:49 2014 +0530

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


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/181bf856/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 57011c7..bf16362 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -909,6 +909,9 @@ public class CordovaWebView extends AmazonWebView {
     
     public void handleDestroy()
     {
+        // Cancel pending timeout timer.
+        loadUrlTimeout++;
+
         // Send destroy event to JavaScript
         // Since baseUrl is set in loadUrlIntoView, if user hit Back button before loadUrl was called, we'll get an NPE on baseUrl (CB-2458)
         this.loadUrl("javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){};");


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