Adds a check to ensure that a NULL pointer from RenderViewHostImpl::FromID() is not dereferenced.

CID=103978
BUG=139242
TEST=

Review URL: https://chromiumcodereview.appspot.com/10820017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148718 0039d316-1c4b-4281-b951-d872f2087c98
parent a570e026
......@@ -1038,10 +1038,12 @@ void RenderViewHostImpl::OnMsgRunModal(int opener_id, IPC::Message* reply_msg) {
RenderViewHostImpl* opener =
RenderViewHostImpl::FromID(GetProcess()->GetID(), run_modal_opener_id_);
opener->StopHangMonitorTimeout();
// The ack for the mouse down won't come until the dialog closes, so fake it
// so that we don't get a timeout.
opener->decrement_in_flight_event_count();
if (opener) {
opener->StopHangMonitorTimeout();
// The ack for the mouse down won't come until the dialog closes, so fake it
// so that we don't get a timeout.
opener->decrement_in_flight_event_count();
}
// TODO(darin): Bug 1107929: Need to inform our delegate to show this view in
// an app-modal fashion.
......
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