Commit d1bda05d authored by beidson@apple.com's avatar beidson@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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 84f8d898
2013-12-02 Brady Eidson <beidson@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 <zoltan@webkit.org>
[CSS Shapes] Support inset parsing
......@@ -390,15 +390,17 @@ int PageCache::frameCount() const
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 @@ void PageCache::markPagesForDeviceScaleChanged(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->markForDeviceScaleChanged();
}
}
......@@ -418,8 +420,10 @@ void PageCache::markPagesForDeviceScaleChanged(Page* page)
#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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment