-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: complete handler must be call before wkwebview dealloc. If not c… #104
base: master
Are you sure you want to change the base?
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的特性了 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix: complete handler must be call before wkwebview dealloc
这个标记位可以加到业务层,库的层面没啥必要加吧 |
方法可行,我也遇到这个问题了,希望能和入这个修改 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix(webview):解决H5异步延时事件触发且webview销毁时奔溃问题
…alled, webview will be crash. When H5 alert( comfirm/ promot) something, and webview dealloc, then the dwkwebview will crash.