Title: [159970] trunk/Source/WebCore
- Revision
- 159970
- Author
- beid...@apple.com
- Date
- 2013-12-02 14:56:01 -0800 (Mon, 02 Dec 2013)
Log Message
Add more CachedPage null checks
https://bugs.webkit.org/show_bug.cgi?id=125106
Reviewed by Sam Weinig.
Only some functions in PageCache.cpp null-check the CachedPages in HistoryItems.
Every part that manipulates the CachedPage should.
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForVistedLinkStyleRecalc):
(WebCore::PageCache::markPagesForFullStyleRecalc):
(WebCore::PageCache::markPagesForDeviceScaleChanged):
(WebCore::PageCache::markPagesForCaptionPreferencesChanged):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (159969 => 159970)
--- trunk/Source/WebCore/ChangeLog 2013-12-02 22:53:15 UTC (rev 159969)
+++ trunk/Source/WebCore/ChangeLog 2013-12-02 22:56:01 UTC (rev 159970)
@@ -1,3 +1,20 @@
+2013-12-02 Brady Eidson <beid...@apple.com>
+
+ Add more CachedPage null checks
+ https://bugs.webkit.org/show_bug.cgi?id=125106
+
+ Reviewed by Sam Weinig.
+
+ Only some functions in PageCache.cpp null-check the CachedPages in HistoryItems.
+
+ Every part that manipulates the CachedPage should.
+
+ * history/PageCache.cpp:
+ (WebCore::PageCache::markPagesForVistedLinkStyleRecalc):
+ (WebCore::PageCache::markPagesForFullStyleRecalc):
+ (WebCore::PageCache::markPagesForDeviceScaleChanged):
+ (WebCore::PageCache::markPagesForCaptionPreferencesChanged):
+
2013-12-02 Zoltan Horvath <zol...@webkit.org>
[CSS Shapes] Support inset parsing
Modified: trunk/Source/WebCore/history/PageCache.cpp (159969 => 159970)
--- trunk/Source/WebCore/history/PageCache.cpp 2013-12-02 22:53:15 UTC (rev 159969)
+++ trunk/Source/WebCore/history/PageCache.cpp 2013-12-02 22:56:01 UTC (rev 159970)
@@ -390,15 +390,17 @@
void PageCache::markPagesForVistedLinkStyleRecalc()
{
- for (HistoryItem* current = m_head; current; current = current->m_next)
- current->m_cachedPage->markForVistedLinkStyleRecalc();
+ for (HistoryItem* current = m_head; current; current = current->m_next) {
+ if (current->m_cachedPage)
+ current->m_cachedPage->markForVistedLinkStyleRecalc();
+ }
}
void PageCache::markPagesForFullStyleRecalc(Page* page)
{
for (HistoryItem* current = m_head; current; current = current->m_next) {
CachedPage* cachedPage = current->m_cachedPage.get();
- if (&page->mainFrame() == &cachedPage->cachedMainFrame()->view()->frame())
+ if (cachedPage && &page->mainFrame() == &cachedPage->cachedMainFrame()->view()->frame())
cachedPage->markForFullStyleRecalc();
}
}
@@ -409,7 +411,7 @@
{
for (HistoryItem* current = m_head; current; current = current->m_next) {
CachedPage* cachedPage = current->m_cachedPage.get();
- if (&page->mainFrame() == &cachedPage->cachedMainFrame()->view()->frame())
+ if (cachedPage && &page->mainFrame() == &cachedPage->cachedMainFrame()->view()->frame())
cachedPage->markForDeviceScaleChanged();
}
}
@@ -418,8 +420,10 @@
#if ENABLE(VIDEO_TRACK)
void PageCache::markPagesForCaptionPreferencesChanged()
{
- for (HistoryItem* current = m_head; current; current = current->m_next)
- current->m_cachedPage->markForCaptionPreferencesChanged();
+ for (HistoryItem* current = m_head; current; current = current->m_next) {
+ if (current->m_cachedPage)
+ current->m_cachedPage->markForCaptionPreferencesChanged();
+ }
}
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes