From 7d8dfb2251a7cdf339ce55b9c224d28c54c10c30 Mon Sep 17 00:00:00 2001 From: "akling@apple.com" Date: Thu, 15 Dec 2016 03:48:49 +0000 Subject: [PATCH] Only send Messages::WebPageProxy::DidSaveToPageCache once when entering page cache. Reviewed by Brady Eidson. We were sending one of these IPC messages per frame when a page enters the page cache, and we really only need one, so only do it for the main frame. (This message is used to adopt the page cache on the UI process side, in case another web process currently owns the cache. That happens in WebProcessPool::processDidCachePage().) * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::didSaveToPageCache): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209851 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit2/ChangeLog | 16 ++++++++++++++++ .../WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 0c5e1d8..64cbda5 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,19 @@ +2016-12-14 Andreas Kling + + Only send Messages::WebPageProxy::DidSaveToPageCache once when entering page cache. + + + Reviewed by Brady Eidson. + + We were sending one of these IPC messages per frame when a page enters the page cache, + and we really only need one, so only do it for the main frame. + + (This message is used to adopt the page cache on the UI process side, in case another + web process currently owns the cache. That happens in WebProcessPool::processDidCachePage().) + + * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: + (WebKit::WebFrameLoaderClient::didSaveToPageCache): + 2016-12-14 Simon Fraser Fix cause of viewport-related flakiness in iOS tests diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp index 84df264..2c57ace 100644 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp @@ -1370,7 +1370,8 @@ void WebFrameLoaderClient::didSaveToPageCache() if (!webPage) return; - webPage->send(Messages::WebPageProxy::DidSaveToPageCache()); + if (m_frame->isMainFrame()) + webPage->send(Messages::WebPageProxy::DidSaveToPageCache()); } void WebFrameLoaderClient::didRestoreFromPageCache() -- 1.8.3.1