[Qt] When deleting a webview that has an open javascript alert will cause a crash. To workaround this then delay the deletion of the webview until after the alert is closed. The attached example reproduces the problem and uncommenting the code in MainApp::deleteWebView() will give a workaround.
Created attachment 156630 [details] Example to reproduce the issue
We're seeing a similar issue in capybara-webkit. See the discussion here: http://git.io/jKcw_g. Basically, if deleteLater causes a WebPage to be deleted while evaluateJavaScript is still running, the resultant message is delivered by WebCore/JSC internals to an invalid object. This results in a segfault. Although the errors in capybara-webkit require redesign to work properly, given that loadFinished does not signify that javaScriptWindowObjectCleared has been fired, it is still concerning that using deleteLater still causes a segfault, even though it is supposed to wait for all signals to be delivered.
=== Bulk closing of Qt bugs === If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary. If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.