[ 
https://issues.apache.org/jira/browse/CB-9519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14966855#comment-14966855
 ] 

ASF GitHub Bot commented on CB-9519:
------------------------------------

Github user vladimir-kotikov commented on the pull request:

    https://github.com/apache/cordova-android/pull/208#issuecomment-149906885
  
    @nikhilkh, i'm not 100% sure - according to comments in the code it might 
sense to have this checked in, but looking at where this code was introduced 
[`087ec11`#L625](https://github.com/apache/cordova-android/commit/087ec11e6abc61acde4e2860f8ee363f3daba578#diff-08c0ff867a9ff2aaaa99017464f55684L625),
 it was always working this way - we never wait for `about:blank` being loaded.
    
    @NoLongerLazyDhl, could you please add some details about the problem, 
which this change solves? Maybe repro steps?


> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to