Commit 7521caae authored by sudarsana.nagineni's avatar sudarsana.nagineni Committed by Commit bot

Fix a crash on closing tab while the plugin settings bubble is visible

Add a null check instead of DCHECK() for web contents since it can be NULL
and cause a crash on debug builds, if the tab is closed while the plugin
settings bubble is visible and the setting was changed to Allow plugins.

BUG=440410

Review URL: https://codereview.chromium.org/791633003

Cr-Commit-Position: refs/heads/master@{#308299}
parent faa29a8d
......@@ -505,7 +505,10 @@ ContentSettingPluginBubbleModel::~ContentSettingPluginBubbleModel() {
void ContentSettingPluginBubbleModel::OnCustomLinkClicked() {
content::RecordAction(UserMetricsAction("ClickToPlay_LoadAll_Bubble"));
DCHECK(web_contents());
// Web contents can be NULL if the tab was closed while the plugins
// settings bubble is visible.
if (!web_contents())
return;
#if defined(ENABLE_PLUGINS)
// TODO(bauerb): We should send the identifiers of blocked plug-ins here.
ChromePluginServiceFilter::GetInstance()->AuthorizeAllPlugins(
......
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