Commit 858211c2 authored by Timothy Loh's avatar Timothy Loh Committed by Commit Bot

Add missing null checks in permissions code

This CL adds a couple of missing null checks in permissions code to
handle the case where a RenderFrameHost has already been destroyed.

Bug: 754585
Change-Id: I1d009b8ec5776421462cba05ecfb499a51034b10
Reviewed-on: https://chromium-review.googlesource.com/1077878Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Commit-Queue: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563137}
parent e8a36809
......@@ -188,6 +188,8 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
content::WebContents::FromRenderFrameHost(
content::RenderFrameHost::FromID(id.render_process_id(),
id.render_frame_id()));
if (!web_contents)
return;
// Only show the location settings dialog if the tab for |web_contents| is
// user-interactable (i.e. is the current tab, and Chrome is active and not
......
......@@ -64,6 +64,8 @@ void FlashPermissionContext::UpdateTabContext(const PermissionRequestID& id,
content::WebContents::FromRenderFrameHost(
content::RenderFrameHost::FromID(id.render_process_id(),
id.render_frame_id()));
if (!web_contents)
return;
if (PluginsEnterpriseSettingEnabled(
HostContentSettingsMapFactory::GetForProfile(profile()))) {
......
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