CB-7974 Cancel timeout timer if view is destroyed

This commit is contained in:
Andrew Grieve 2014-11-06 15:33:10 -05:00
parent 032ea8a8d3
commit e78db000c6

View File

@ -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');};");