Fix: complete handler must be call before wkwebview dealloc. If not c…#104
Fix: complete handler must be call before wkwebview dealloc. If not c…#104gdxz123 wants to merge 2 commits into
Conversation
…alled, webview will be crash. When H5 alert( comfirm/ promot) something, and webview dealloc, then the dwkwebview will crash.
|
bugly crash report: #0 Thread |
|
赞,这样即使销毁后弹窗也不会导致crash了。不过还是会出现webview已经关闭,仍然弹出alert框的情况,最好加个标识位,webview不可见的情况下直接调用completionHandler |
最好别做这样的逻辑,因为不可见的情况可能有些业务逻辑就是要弹aler弹窗,本身出现这样的奔溃主要是因为webview释放了,但还在执行alert动作,我们修复这个bug就好了,不应在不可见的时候执行completionHanler,因为这样就改变了webview的特性了 |
gdxz123
left a comment
There was a problem hiding this comment.
Fix: complete handler must be call before wkwebview dealloc
这个标记位可以加到业务层,库的层面没啥必要加吧 |
|
方法可行,我也遇到这个问题了,希望能和入这个修改 |
gdxz123
left a comment
There was a problem hiding this comment.
fix(webview):解决H5异步延时事件触发且webview销毁时奔溃问题
…alled, webview will be crash. When H5 alert( comfirm/ promot) something, and webview dealloc, then the dwkwebview will crash.