Bug 153449 - Make sure a page is still PageCache-able after firing the 'pagehide' events
Summary: Make sure a page is still PageCache-able after firing the 'pagehide' events
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 156033
  Show dependency treegraph
 
Reported: 2016-01-25 14:53 PST by Chris Dumez
Modified: 2016-03-30 12:39 PDT (History)
9 users (show)

See Also:


Attachments
Patch (8.29 KB, patch)
2016-01-25 15:19 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (8.50 KB, patch)
2016-01-25 15:21 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (10.35 KB, patch)
2016-01-26 11:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-01-25 14:53:52 PST
Make sure a page is still PageCache-able after firing the 'pagehide' events and abort if it isn't. This should improve robustness and it is easy for pagehide event handlers to do things that would make a Page no longer PageCache-able and this leads to bugs that are difficult to investigate.
Comment 1 Chris Dumez 2016-01-25 15:19:19 PST
Created attachment 269802 [details]
Patch
Comment 2 Chris Dumez 2016-01-25 15:21:02 PST
Created attachment 269803 [details]
Patch
Comment 3 Radar WebKit Bug Importer 2016-01-25 15:21:59 PST
<rdar://problem/24335880>
Comment 4 Chris Dumez 2016-01-25 15:25:03 PST
Comment on attachment 269803 [details]
Patch

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

> Source/WebCore/history/PageCache.cpp:423
> +    if (!canCache(page)) {

I am planning to add diagnostic logging for this in a follow-up patch so we can see how often this happens.
Comment 5 Andreas Kling 2016-01-26 10:36:49 PST
Comment on attachment 269803 [details]
Patch

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

r=me

> Source/WebCore/history/PageCache.cpp:402
> +    // Create the CachedFrames for all Frames in the FrameTree.
> +    for (RefPtr<Frame> child = frame.tree().firstChild(); child; child = child->tree().nextSibling())
> +        firePageHideEventRecursively(*child);

This comment doesn't make sense here.
Comment 6 Chris Dumez 2016-01-26 11:43:47 PST
Created attachment 269896 [details]
Patch
Comment 7 WebKit Commit Bot 2016-01-26 11:57:59 PST
Comment on attachment 269896 [details]
Patch

Clearing flags on attachment: 269896

Committed r195605: <http://trac.webkit.org/changeset/195605>
Comment 8 WebKit Commit Bot 2016-01-26 11:58:04 PST
All reviewed patches have been landed.  Closing bug.