Fix render process crash when detaching a frame that never navigated.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1369 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-08-16 17:05:26 +00:00
parent 40c237c31c
commit 940d2c474d
1 changed files with 5 additions and 4 deletions

View File

@ -479,13 +479,14 @@ void CefBrowserImpl::DidStartProvisionalLoad(WebKit::WebFrame* frame) {
void CefBrowserImpl::FrameDetached(WebFrame* frame) {
int64 frame_id = frame->identifier();
{
if (!frames_.empty()) {
// Remove the frame from the map.
FrameMap::iterator it = frames_.find(frame_id);
DCHECK(it != frames_.end());
if (it != frames_.end()) {
it->second->Detach();
frames_.erase(it);
}
}
if (!frame_objects_.empty()) {
// Remove any tracked objects associated with the frame.