Commit c2752c91 authored by W. James MacLean's avatar W. James MacLean Committed by Commit Bot

Revise DCHECK to consider app-guest WeContents difference.

This CL revises a DCHECK that has been firing (erroneously) when Flash
content is loaded inside a WebView.

Bug: 873672
Change-Id: I75c12c67b47a5b337054a262991d23247bbbb4ea
Reviewed-on: https://chromium-review.googlesource.com/1173359Reviewed-by: default avatarEhsan Karamad <ekaramad@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583232}
parent 34d77604
......@@ -351,8 +351,13 @@ bool AppWindow::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type) {
DCHECK_EQ(AppWindow::web_contents(),
content::WebContents::FromRenderFrameHost(render_frame_host));
DCHECK(AppWindow::web_contents() ==
content::WebContents::FromRenderFrameHost(render_frame_host) ||
(content::WebContents::FromRenderFrameHost(render_frame_host)
->GetOuterWebContents() &&
AppWindow::web_contents() ==
content::WebContents::FromRenderFrameHost(render_frame_host)
->GetOuterWebContents()));
return helper_->CheckMediaAccessPermission(render_frame_host, security_origin,
type);
}
......
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