Fix CefFrame::GetSource crash on detached frame (fixes issue #2898)
This commit is contained in:
parent
cf6b57d659
commit
01f385a6f7
|
@ -367,6 +367,11 @@ void CefFrameHostImpl::SendCommand(
|
|||
if (frame_id < CefFrameHostImpl::kMainFrameId)
|
||||
return;
|
||||
|
||||
if (!render_frame_host_ || !response_manager_) {
|
||||
// detached frame has no response_manager_
|
||||
return;
|
||||
}
|
||||
|
||||
TRACE_EVENT2("cef", "CefFrameHostImpl::SendCommand", "frame_id", frame_id,
|
||||
"needsResponse", responseHandler.get() ? 1 : 0);
|
||||
Cef_Request_Params params;
|
||||
|
@ -407,6 +412,11 @@ void CefFrameHostImpl::SendCode(
|
|||
if (frame_id < CefFrameHostImpl::kMainFrameId)
|
||||
return;
|
||||
|
||||
if (!render_frame_host_ || !response_manager_) {
|
||||
// detached frame has no response_manager_
|
||||
return;
|
||||
}
|
||||
|
||||
TRACE_EVENT2("cef", "CefFrameHostImpl::SendCommand", "frame_id", frame_id,
|
||||
"needsResponse", responseHandler.get() ? 1 : 0);
|
||||
Cef_Request_Params params;
|
||||
|
|
Loading…
Reference in New Issue