cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Kotikov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-9519) Inappropriate destruction time of engine in CordovaWebViewImpl
Date Wed, 21 Oct 2015 13:34:27 GMT

     [ https://issues.apache.org/jira/browse/CB-9519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vladimir Kotikov updated CB-9519:
---------------------------------
    Component/s:     (was: CordovaLib)

> Inappropriate destruction time of engine in CordovaWebViewImpl
> --------------------------------------------------------------
>
>                 Key: CB-9519
>                 URL: https://issues.apache.org/jira/browse/CB-9519
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Dong Hanlin
>            Assignee: Vladimir Kotikov
>
> In {{CordovaWebViewImpl.java}}, one of the TODO comments in {{public void handleDestroy()}}
method points out that the engine should not destroy webview until after about:blank is done
loading. Actually, the engine has indeed been destroyed before about:blank is completely loaded,
which causes some problems.
> I think moving a line of code may work:
> {quote}
> engine.destroy();
> {quote}
> This code can be moved into the last {{if}} block in {{public void onPageFinishedLoading(String
url)}}, like this:
> {code}
>             // Shutdown if blank loaded
>             if (url.equals("about:blank")) {
>                 engine.destroy();
>                 pluginManager.postMessage("exit", null);
>             }
> {code}
> Since before destroying the engine, we have set the URL to be about:blank, so destroying
it when about:blank is completed loaded can work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message