[Qt] Crash in WebCore::CachedFrame::destroy
authorjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 13:55:49 +0000 (13:55 +0000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 17 Jan 2013 16:36:03 +0000 (17:36 +0100)
commitdfa20637622bfadde8882afbf1e8b8500833b170
treeab07fe31c10929cadbaff34153ae2130f311e872
parent9cf93e3805aee0647510e0f3d243c7b8869b1348
[Qt] Crash in WebCore::CachedFrame::destroy
https://bugs.webkit.org/show_bug.cgi?id=104525

Reviewed by Adam Barth.

Source/WebCore:

Add an assert to increase the chances of catching this crash
early on in the future.

* dom/Document.cpp:
(WebCore::Document::takeDOMWindowFrom):

Source/WebKit/qt:

Remove the call to HistoryController::setCurrentItem which is ultimately
causing the initial empty document of a page to be added to the page cache.

This re-introduce the bug that was fixed by this line, which will be
properly fixed in a follow-up patch.

* Api/qwebhistory.cpp:
(operator>>):
* tests/qwebhistory/tst_qwebhistory.cpp:
(tst_QWebHistory::saveAndRestore_crash_4): Cover the crash.

Change-Id: Ia96ba570231557f8b53bc586410d50875880e1d1
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebKit/qt/Api/qwebhistory.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp