Bug 110652

Summary: add to HistoryItem a way to know if its underlying CachedPage has expired
Product: WebKit Reporter: Alice Liu <alice.barraclough>
Component: HistoryAssignee: Alice Liu <alice.barraclough>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, buildbot, ddkilzer, joepeck, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
not for review, just running through bots
buildbot: commit-queue-
patch beidson: review+

Description Alice Liu 2013-02-22 15:31:48 PST
Add to HistoryItem a way to know if its underlying CachedPage has expired. 

This inevitably touches some existing code that has hard-coded the expiration time for a back/forward PageCached-item to 1800.  
It was okay to have hard-coded these because the FIXMEs made it okay.   Fixmes make everything okay.
Comment 1 Alice Liu 2013-02-22 15:54:49 PST
Created attachment 189853 [details]
not for review, just running through bots
Comment 2 Build Bot 2013-02-22 17:46:32 PST
Comment on attachment 189853 [details]
not for review, just running through bots

Attachment 189853 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://queues.webkit.org/results/16719342
Comment 3 Alice Liu 2013-02-22 18:13:41 PST
Created attachment 189888 [details]
patch
Comment 4 Brady Eidson 2013-02-26 11:17:30 PST
Comment on attachment 189888 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=189888&action=review

r+ with that change

> Source/WebCore/history/CachedPage.cpp:56
>      : m_timeStamp(currentTime())
> +    , m_expiration(m_timeStamp + page->settings()->backForwardCacheExpirationInterval())
>      , m_cachedMainFrame(CachedFrame::create(page->mainFrame()))

Could this be m_expirationTime instead?

> Source/WebCore/history/CachedPage.cpp:122
> +bool CachedPage::hasExpired() const
> +{
> +    return currentTime() > m_expiration;
> +}

If it was, this code would read more naturally.
Comment 5 Alice Liu 2013-03-14 00:34:04 PDT
committed r145789