RESOLVED FIXED 146299
Prevent new loads while in PageCache (or being added to PageCache)
https://bugs.webkit.org/show_bug.cgi?id=146299
Summary Prevent new loads while in PageCache (or being added to PageCache)
Chris Dumez
Reported 2015-06-24 16:57:29 PDT
Prevent new loads while in PageCache (or being added to PageCache).
Attachments
Patch (13.77 KB, patch)
2015-06-24 21:36 PDT, Chris Dumez
darin: review+
Chris Dumez
Comment 1 2015-06-24 16:57:45 PDT
Chris Dumez
Comment 2 2015-06-24 21:36:23 PDT
Chris Dumez
Comment 3 2015-06-25 09:41:40 PDT
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.
Darin Adler
Comment 4 2015-06-26 10:56:18 PDT
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();
Chris Dumez
Comment 5 2015-06-26 11:27:09 PDT
Note You need to log in before you can comment on or make changes to this bug.