[
https://issues.apache.org/jira/browse/CB-9519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14704366#comment-14704366
]
ASF GitHub Bot commented on CB-9519:
------------------------------------
GitHub user NoLongerLazyDhl opened a pull request:
https://github.com/apache/cordova-android/pull/207
CB-9519 Fix the engine destruction bug
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/NoLongerLazyDhl/cordova-android 4.1.x
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-android/pull/207.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #207
----
commit 2a3eccbd3341ef6abb4bfc4365cd476e76cf8958
Author: Dong Hanlin <[email protected]>
Date: 2015-08-20T06:21:50Z
CB-9519 Fix the engine destruction bug
----
> 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, CordovaLib
> Reporter: Dong Hanlin
>
> 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: [email protected]
For additional commands, e-mail: [email protected]