Title: [131953] trunk/Source/WebCore
- Revision
- 131953
- Author
- [email protected]
- Date
- 2012-10-19 16:13:08 -0700 (Fri, 19 Oct 2012)
Log Message
Page should be removed from the cache right after restore was called.
https://bugs.webkit.org/show_bug.cgi?id=99737
Patch by Dima Gorbik <[email protected]> on 2012-10-19
Reviewed by Brady Eidson.
The pageCache was inconsistent after the restoration for a period of time because the cachedFrame is being nulled,
but the page is still in the Cache. Now the page is being removed from the cache right after the restoration.
This issue was spotted in a custom built application using WebKit and unfortunately there is no way to test this
behavior in LayoutTests. All the current tests that exercise the page cache do pass.
No new tests.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (131952 => 131953)
--- trunk/Source/WebCore/ChangeLog 2012-10-19 22:54:46 UTC (rev 131952)
+++ trunk/Source/WebCore/ChangeLog 2012-10-19 23:13:08 UTC (rev 131953)
@@ -1,3 +1,20 @@
+2012-10-19 Dima Gorbik <[email protected]>
+
+ Page should be removed from the cache right after restore was called.
+ https://bugs.webkit.org/show_bug.cgi?id=99737
+
+ Reviewed by Brady Eidson.
+
+ The pageCache was inconsistent after the restoration for a period of time because the cachedFrame is being nulled,
+ but the page is still in the Cache. Now the page is being removed from the cache right after the restoration.
+ This issue was spotted in a custom built application using WebKit and unfortunately there is no way to test this
+ behavior in LayoutTests. All the current tests that exercise the page cache do pass.
+
+ No new tests.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::commitProvisionalLoad):
+
2012-10-19 Max Vujovic <[email protected]>
[WebGL] getUniformLocation fails for uniform array name without array brackets
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (131952 => 131953)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2012-10-19 22:54:46 UTC (rev 131952)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2012-10-19 23:13:08 UTC (rev 131953)
@@ -1699,6 +1699,9 @@
prepareForCachedPageRestore();
cachedPage->restore(m_frame->page());
+ // The page should be removed from the cache immediately after a restoration in order for the PageCache to be consistent.
+ pageCache()->remove(history()->currentItem());
+
dispatchDidCommitLoad();
// If we have a title let the WebView know about it.
@@ -1707,8 +1710,11 @@
m_client->dispatchDidReceiveTitle(title);
checkCompleted();
- } else
+ } else {
+ if (cachedPage)
+ pageCache()->remove(history()->currentItem());
didOpenURL();
+ }
LOG(Loading, "WebCoreLoading %s: Finished committing provisional load to URL %s", m_frame->tree()->uniqueName().string().utf8().data(),
m_frame->document() ? m_frame->document()->url().string().utf8().data() : "");
@@ -1736,8 +1742,6 @@
// Could be an issue with a giant local file.
notifier()->sendRemainingDelegateMessages(m_documentLoader.get(), identifier, response, 0, static_cast<int>(response.expectedContentLength()), 0, error);
}
-
- pageCache()->remove(history()->currentItem());
// FIXME: Why only this frame and not parent frames?
checkLoadCompleteForThisFrame();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes