Title: [108550] trunk/Source/WebCore
Revision
108550
Author
[email protected]
Date
2012-02-22 14:09:54 -0800 (Wed, 22 Feb 2012)

Log Message

Crash when marking cached pages for full style recalc
https://bugs.webkit.org/show_bug.cgi?id=79276
<rdar://problem/10884036>

Reviewed by Beth Dakin.

Guard against a null history item.

* history/BackForwardController.cpp:
(WebCore::BackForwardController::markPagesForFullStyleRecalc):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (108549 => 108550)


--- trunk/Source/WebCore/ChangeLog	2012-02-22 22:03:48 UTC (rev 108549)
+++ trunk/Source/WebCore/ChangeLog	2012-02-22 22:09:54 UTC (rev 108550)
@@ -1,3 +1,16 @@
+2012-02-22  Anders Carlsson  <[email protected]>
+
+        Crash when marking cached pages for full style recalc
+        https://bugs.webkit.org/show_bug.cgi?id=79276
+        <rdar://problem/10884036>
+
+        Reviewed by Beth Dakin.
+
+        Guard against a null history item.
+
+        * history/BackForwardController.cpp:
+        (WebCore::BackForwardController::markPagesForFullStyleRecalc):
+
 2012-02-22  Ken Buchanan  <[email protected]>
 
         Crash from empty anonymous block preceding :before content

Modified: trunk/Source/WebCore/history/BackForwardController.cpp (108549 => 108550)


--- trunk/Source/WebCore/history/BackForwardController.cpp	2012-02-22 22:03:48 UTC (rev 108549)
+++ trunk/Source/WebCore/history/BackForwardController.cpp	2012-02-22 22:09:54 UTC (rev 108550)
@@ -116,7 +116,13 @@
     for (int i = first; i <= last; i++) {
         if (!i)
             continue;
-        itemAtIndex(i)->markForFullStyleRecalc();
+
+        // FIXME: itemAtIndex should never return null here, but due to the way the
+        // back/forward list is implemented in WebKit2 it sometimes can, when the
+        // session has been updated in the UI process but the session update message
+        // hasn't yet reached the web process.
+        if (HistoryItem* historyItem = itemAtIndex(i))
+            historyItem->markForFullStyleRecalc();
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to