Commit 3d2ff16f authored by ggaren@apple.com's avatar ggaren@apple.com

2011-01-30 Geoffrey Garen <ggaren@apple.com>

        Reviewed by Sam Weinig.

        [Take 2!]
        Fixed crash on window close (maybe crash on launch?) due to missing frame null checks
        https://bugs.webkit.org/show_bug.cgi?id=53408

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::didNavigateWithNavigationData):
        (WebKit::WebContext::didPerformClientRedirect):
        (WebKit::WebContext::didPerformServerRedirect):
        (WebKit::WebContext::didUpdateHistoryTitle): Use MESSAGE_CHECK because
        we don't think we should be able to reach this state under normal conditions.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e33f672b
2011-01-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
[Take 2!]
Fixed crash on window close (maybe crash on launch?) due to missing frame null checks
https://bugs.webkit.org/show_bug.cgi?id=53408
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didNavigateWithNavigationData):
(WebKit::WebContext::didPerformClientRedirect):
(WebKit::WebContext::didPerformServerRedirect):
(WebKit::WebContext::didUpdateHistoryTitle): Use MESSAGE_CHECK because
we don't think we should be able to reach this state under normal conditions.
2011-01-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
......@@ -52,6 +52,8 @@
#include <wtf/RefCountedLeakCounter.h>
#endif
#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process()->connection())
using namespace WebCore;
namespace WebKit {
......@@ -299,7 +301,8 @@ void WebContext::didReceiveSynchronousMessageFromInjectedBundle(const String& me
void WebContext::didNavigateWithNavigationData(uint64_t pageID, const WebNavigationDataStore& store, uint64_t frameID)
{
WebFrameProxy* frame = m_process->webFrame(frameID);
if (!frame || !frame->page())
MESSAGE_CHECK(frame);
if (!frame->page())
return;
m_historyClient.didNavigateWithNavigationData(this, frame->page(), store, frame);
......@@ -308,7 +311,8 @@ void WebContext::didNavigateWithNavigationData(uint64_t pageID, const WebNavigat
void WebContext::didPerformClientRedirect(uint64_t pageID, const String& sourceURLString, const String& destinationURLString, uint64_t frameID)
{
WebFrameProxy* frame = m_process->webFrame(frameID);
if (!frame || !frame->page())
MESSAGE_CHECK(frame);
if (!frame->page())
return;
m_historyClient.didPerformClientRedirect(this, frame->page(), sourceURLString, destinationURLString, frame);
......@@ -317,7 +321,8 @@ void WebContext::didPerformClientRedirect(uint64_t pageID, const String& sourceU
void WebContext::didPerformServerRedirect(uint64_t pageID, const String& sourceURLString, const String& destinationURLString, uint64_t frameID)
{
WebFrameProxy* frame = m_process->webFrame(frameID);
if (!frame || !frame->page())
MESSAGE_CHECK(frame);
if (!frame->page())
return;
m_historyClient.didPerformServerRedirect(this, frame->page(), sourceURLString, destinationURLString, frame);
......@@ -326,7 +331,8 @@ void WebContext::didPerformServerRedirect(uint64_t pageID, const String& sourceU
void WebContext::didUpdateHistoryTitle(uint64_t pageID, const String& title, const String& url, uint64_t frameID)
{
WebFrameProxy* frame = m_process->webFrame(frameID);
if (!frame || !frame->page())
MESSAGE_CHECK(frame);
if (!frame->page())
return;
m_historyClient.didUpdateHistoryTitle(this, frame->page(), title, url, frame);
......
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