Summary: | Prevent new loads while in PageCache (or being added to PageCache) | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | Page Loading | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | aestes, ap, barraclough, beidson, commit-queue, ddkilzer, japhet | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=145748 | ||||||
Attachments: |
|
Description
Chris Dumez
2015-06-24 16:57:29 PDT
Created attachment 255540 [details]
Patch
Comment on attachment 255540 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255540&action=review > Source/WebCore/loader/cache/CachedResource.cpp:218 > + if (cachedResourceLoader.frame()->page() && cachedResourceLoader.frame()->page()->inPageCache()) { This is the actual change. The test of the patch is about getting rid of the complexity I added in r185337. Comment on attachment 255540 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255540&action=review > Source/WebCore/loader/FrameLoader.h:280 > + enum class PageDismissalType { > + None, > + BeforeUnload, > + PageHide, > + Unload > + }; I like this better in a single line; not sure if others agree. > Source/WebCore/loader/cache/CachedResource.cpp:217 > + // Prevent new loads if we are in the PageCache (or being added to the PageCache). I would not use parentheses here. Just leave them out. > Source/WebCore/page/Page.cpp:571 > + auto* document = mainFrame().document(); > + if (!document) > + return false; > + > + return document->inPageCache(); I like writing it like this: auto* document = mainFrame().document(); return document && document->inPageCache(); Committed r186005: <http://trac.webkit.org/changeset/186005> |