Qt WebKit crash in QWebHistory::saveState() if history instance was created from empty QWebPage and loaded by QWebHistory::restoreState(). Example, this code cause crash: { QByteArray tmp = hist->saveState(); QWebPage* page2 = new QWebPage(this); QWebHistory* hist2 = page2->history(); for (unsigned i = 0; i < 5; i++){ hist2->restoreState(tmp); hist2->saveState(); } delete page2; } Of course, the application should not crash :-)
Created attachment 38546 [details] Path to QWebHistory::clear() QWebHistory::clear() shouldn't create empty entry (item) if QWebHistory::count()<1; Additional autotests were added.
Landed r47818 in http://trac.webkit.org/changeset/47818