diff options
| author | jocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | 2013-01-16 13:55:49 +0000 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-17 17:36:03 +0100 |
| commit | dfa20637622bfadde8882afbf1e8b8500833b170 (patch) | |
| tree | ab07fe31c10929cadbaff34153ae2130f311e872 /Source/WebCore/dom/Document.cpp | |
| parent | 9cf93e3805aee0647510e0f3d243c7b8869b1348 (diff) | |
[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>
Diffstat (limited to 'Source/WebCore/dom/Document.cpp')
| -rw-r--r-- | Source/WebCore/dom/Document.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index 0bb8cc019..70e271c8c 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -3612,6 +3612,8 @@ void Document::takeDOMWindowFrom(Document* document) ASSERT(m_frame); ASSERT(!m_domWindow); ASSERT(document->domWindow()); + // A valid DOMWindow is needed by CachedFrame for its documents. + ASSERT(!document->inPageCache()); m_domWindow = document->m_domWindow.release(); m_domWindow->didSecureTransitionTo(this); |
