<rdar://problem/8070662> REGRESSION (r51629): WebBackForwardList created via -init...
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jun 2010 20:03:37 +0000 (20:03 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jun 2010 20:03:37 +0000 (20:03 +0000)
commit973afde559fe7aa27aee54d65651367af6373e7f
treebbaabd160448debf6da7b76f8e03ea01c2a06647
parentad4e3fdbb26ada4eb82306866cd9caa4e0f2189c
<rdar://problem/8070662> REGRESSION (r51629): WebBackForwardList created via -init crashes when -addItem: is called.

Reviewed by Adele Peterson.

A WebBackForwardList created via -init results in a BackForwardList being created with a null m_page.
BackForwardList needs to be careful not to dereference m_page without first ensuring it's not null.

* history/BackForwardList.cpp:
(WebCore::BackForwardList::addItem): Null-check m_page.
(WebCore::BackForwardList::goBack): Ditto.
(WebCore::BackForwardList::goForward): Ditto.
(WebCore::BackForwardList::goToItem): Ditto.
(WebCore::BackForwardList::setCapacity): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@60908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/history/BackForwardList.cpp