Commit 9d33d78d authored by Nicholas Verne's avatar Nicholas Verne Committed by Commit Bot

This is a fix for crash bug crbug:783189

initialize PluginInfoPtrs. The crash happens when chrome::mojom::GetPluginInfo
fails in sync mode. Then the output PluginInfoPtr is left null. We instead
default initialize it with PluginInfo::New() as this is what the subsequent
code expects.

Bug: 783189
Change-Id: I51e25b127858b8ede79f6762f0f5e870166254d1
Reviewed-on: https://chromium-review.googlesource.com/762848Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarYuzhu Shen <yzshen@chromium.org>
Reviewed-by: default avatarSam McNally <sammc@chromium.org>
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515873}
parent 8311fa7a
......@@ -678,7 +678,7 @@ bool ChromeContentRendererClient::OverrideCreatePlugin(
GURL url(params.url);
#if BUILDFLAG(ENABLE_PLUGINS)
chrome::mojom::PluginInfoPtr plugin_info;
chrome::mojom::PluginInfoPtr plugin_info = chrome::mojom::PluginInfo::New();
GetPluginInfoHost()->GetPluginInfo(
render_frame->GetRoutingID(), url,
render_frame->GetWebFrame()->Top()->GetSecurityOrigin(), orig_mime_type,
......
......@@ -211,7 +211,7 @@ void ChromePluginPlaceholder::PluginListChanged() {
if (!render_frame() || !plugin())
return;
chrome::mojom::PluginInfoPtr plugin_info;
chrome::mojom::PluginInfoPtr plugin_info = chrome::mojom::PluginInfo::New();
std::string mime_type(GetPluginParams().mime_type.Utf8());
ChromeContentRendererClient::GetPluginInfoHost()->GetPluginInfo(
......
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