Commit bf92439f authored by aroben@apple.com's avatar aroben@apple.com

Don't crash when a frame is destroyed after the UI process has disconnected

Fixes <http://webkit.org/b/45535> <rdar://problem/8412928> Crash in
WebProcess::removeWebFrame on exit with WebKit2 (Release builds only)

Reviewed by Darin Adler.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::removeWebFrame): Null-check m_connection before
dereferencing it.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4f59c84d
2010-09-10 Adam Roben <aroben@apple.com>
Don't crash when a frame is destroyed after the UI process has
disconnected
Fixes <http://webkit.org/b/45535> <rdar://problem/8412928> Crash in
WebProcess::removeWebFrame on exit with WebKit2 (Release builds only)
Reviewed by Darin Adler.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::removeWebFrame): Null-check m_connection before
dereferencing it.
2010-09-09 Simon Fraser <simon.fraser@apple.com>
Reviewed by Adam Roben.
......
......@@ -392,6 +392,12 @@ void WebProcess::addWebFrame(uint64_t frameID, WebFrame* frame)
void WebProcess::removeWebFrame(uint64_t frameID)
{
m_frameMap.remove(frameID);
// We can end up here after our connection has closed when WebCore's frame life-support timer
// fires when the application is shutting down. There's no need (and no way) to update the UI
// process in this case.
if (!m_connection)
return;
m_connection->send(WebProcessProxyMessage::DidDestroyFrame, 0, CoreIPC::In(frameID));
}
......
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