summaryrefslogtreecommitdiffstats
path: root/WebCore/history/CachedPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/history/CachedPage.cpp')
-rw-r--r--WebCore/history/CachedPage.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/WebCore/history/CachedPage.cpp b/WebCore/history/CachedPage.cpp
index 7167275..d6b66db 100644
--- a/WebCore/history/CachedPage.cpp
+++ b/WebCore/history/CachedPage.cpp
@@ -29,6 +29,9 @@
#include "CachedFrame.h"
#include "FocusController.h"
#include "Frame.h"
+#ifndef NDEBUG
+#include "FrameView.h"
+#endif
#include "Page.h"
#include <wtf/CurrentTime.h>
#include <wtf/RefCountedLeakCounter.h>
@@ -48,7 +51,7 @@ PassRefPtr<CachedPage> CachedPage::create(Page* page)
CachedPage::CachedPage(Page* page)
: m_timeStamp(currentTime())
- , m_cachedMainFrame(page->mainFrame())
+ , m_cachedMainFrame(CachedFrame::create(page->mainFrame()))
{
#ifndef NDEBUG
cachedPageCounter.increment();
@@ -66,8 +69,8 @@ CachedPage::~CachedPage()
void CachedPage::restore(Page* page)
{
- ASSERT(page && page->mainFrame());
- m_cachedMainFrame.restore(page->mainFrame());
+ ASSERT(page && page->mainFrame() && page->mainFrame() == m_cachedMainFrame->view()->frame());
+ m_cachedMainFrame->restore();
// Restore the focus appearance for the focused element.
// FIXME: Right now we don't support pages w/ frames in the b/f cache. This may need to be tweaked when we add support for that.