Bug 33652 - REGRESSION: Frames stop appearing after browsing for a while
Summary: REGRESSION: Frames stop appearing after browsing for a while
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-13 22:31 PST by Alexey Proskuryakov
Modified: 2012-09-26 14:14 PDT (History)
2 users (show)

See Also:


Attachments
proposed fix (11.81 KB, patch)
2010-01-13 22:38 PST, Alexey Proskuryakov
beidson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2010-01-13 22:31:10 PST
Frames that go into b/f cache still count towards the limit of 200 frames on a page (even once cached pages are destroyed). So, frames may cease to be rendered after browsing for a while.

Patch forthcoming.
Comment 1 Alexey Proskuryakov 2010-01-13 22:38:09 PST
Created attachment 46540 [details]
proposed fix
Comment 2 WebKit Review Bot 2010-01-13 22:43:37 PST
Attachment 46540 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/page/Page.h:135:  More than one command on the same line  [whitespace/newline] [4]
WebCore/page/Page.h:136:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 2
Comment 3 Brady Eidson 2010-01-14 10:50:55 PST
Comment on attachment 46540 [details]
proposed fix

r+

(fun layout test)
Comment 4 Alexey Proskuryakov 2010-01-14 11:04:28 PST
Committed <http://trac.webkit.org/changeset/53274>.
Comment 5 Darin Adler 2010-01-14 11:07:04 PST
Comment on attachment 46540 [details]
proposed fix

> +#if !ASSERT_DISABLED
> +void Page::checkFrameCountConsistency() const
> +{
> +    ASSERT(m_frameCount >= 0);
> +
> +    int frameCount = 0;
> +    for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
> +        ++frameCount;
> +
> +    ASSERT(m_frameCount + 1 == frameCount);
> +}
> +#endif
>  } // namespace WebCore

Seems to me it should be m_subframeCount, since the main frame is not included in the count.

Missing blank line here too.

> +#if ASSERT_DISABLED
> +        void checkFrameCountConsistency() const { }
> +#else
> +        void checkFrameCountConsistency() const;
> +#endif

I normally prefer to keep the #if out of the class definition in a case like this, using a separate inline function definition later in the header.
Comment 6 Alexey Proskuryakov 2010-01-14 12:21:31 PST
> Seems to me it should be m_subframeCount, since the main frame is not included
> in the count.

It definitely should! Brady and me agreed that this change shouldn't be part of this patch though.
Comment 7 Simon Fraser (smfr) 2012-09-26 14:14:59 PDT
Renamed to subframe count in http://trac.webkit.org/changeset/129707