Title: [165134] branches/safari-537.75-branch/Source/WebCore
Revision
165134
Author
[email protected]
Date
2014-03-05 15:16:47 -0800 (Wed, 05 Mar 2014)

Log Message

Merge r159970.

Modified Paths

Diff

Modified: branches/safari-537.75-branch/Source/WebCore/ChangeLog (165133 => 165134)


--- branches/safari-537.75-branch/Source/WebCore/ChangeLog	2014-03-05 22:59:18 UTC (rev 165133)
+++ branches/safari-537.75-branch/Source/WebCore/ChangeLog	2014-03-05 23:16:47 UTC (rev 165134)
@@ -1,5 +1,26 @@
 2014-03-05  Matthew Hanson  <[email protected]>
 
+        Merge r159970.
+
+    2013-12-02  Brady Eidson  <[email protected]>
+
+            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):
+
+2014-03-05  Matthew Hanson  <[email protected]>
+
         Merge r159986.
 
     2013-12-02  Brady Eidson  <[email protected]> 

Modified: branches/safari-537.75-branch/Source/WebCore/history/PageCache.cpp (165133 => 165134)


--- branches/safari-537.75-branch/Source/WebCore/history/PageCache.cpp	2014-03-05 22:59:18 UTC (rev 165133)
+++ branches/safari-537.75-branch/Source/WebCore/history/PageCache.cpp	2014-03-05 23:16:47 UTC (rev 165134)
@@ -391,8 +391,10 @@
 
 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)
@@ -401,7 +403,7 @@
 
     for (HistoryItem* current = m_head; current; current = current->m_next) {
         CachedPage* cachedPage = current->m_cachedPage.get();
-        if (cachedPage->cachedMainFrame()->view()->frame() == mainFrame)
+        if (cachedPage && cachedPage->cachedMainFrame()->view()->frame() == mainFrame)
             cachedPage->markForFullStyleRecalc();
     }
 }
@@ -414,7 +416,7 @@
 
     for (HistoryItem* current = m_head; current; current = current->m_next) {
         CachedPage* cachedPage = current->m_cachedPage.get();
-        if (cachedPage->cachedMainFrame()->view()->frame() == mainFrame)
+        if (cachedPage && cachedPage->cachedMainFrame()->view()->frame() == mainFrame)
             cachedPage->markForDeviceScaleChanged();
     }
 }
@@ -423,8 +425,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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to