2010-08-12 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Aug 2010 03:21:42 +0000 (03:21 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Aug 2010 03:21:42 +0000 (03:21 +0000)
commit076fe82fdf48ce405513e6289801dffacff7df24
tree88d3a40d7089934268c5896d699d3036cee30a79
parent336a1acc06053cf9cd4a189baf3bf19a454336a7
2010-08-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Sam Weinig.

        WebKit2 crashes when WebFrame outlives WebPage
        https://bugs.webkit.org/show_bug.cgi?id=43939

        * WebProcess/WebCoreSupport/WebChromeClient.h:
        (WebKit::WebChromeClient::page): Add this method, to allow
        WebFrame to retrieve its WebPage following WebCore pointers.
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::WebFrame): Do not initialize m_page (it's gone).
        (WebKit::WebFrame::page): Don't use the data member, get it from
        WebCore.
        (WebKit::WebFrame::invalidate): Use method to get page() and null check.
        (WebKit::WebFrame::isMainFrame): ditto
        * WebProcess/WebPage/WebFrame.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2/ChangeLog
WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
WebKit2/WebProcess/WebPage/WebFrame.cpp
WebKit2/WebProcess/WebPage/WebFrame.h