DCHECK in AppWindow::CheckMediaAccessPermission for flash loaded inside <webview> |
||
Issue descriptionChrome Version: 70.0.3521.0 OS: Desktop What steps will reproduce the problem? (1) Build Chromium for ToT and make sure DCHECK is enabled. (2) Run chrome with --pappi-flash-version=VERSION and --ppapi-flash-path=PATH (the values can be obtained from chrome://flash). (3) Install and run chrome multi-tab browser: https://chrome.google.com/webstore/detail/multi-tabbed-browser/nfcmophndjlljioblddmepjbcfnocnak Alternatively, any page with <webview> which also makes use of permissions API works. (4) Navigate the browser app to: https://www.permadi.com/tutorial/flash9FullScreen/index.html (5) Grant permission to load plugin when the popup appears. (6) DCHECK fires. I believe the assumption of DCHECK is incorrect as the <webview> inside is a separate WebContents than that of the AppWindow itself. Note that <webview> uses its embedder contents' delegate to handle permissions: https://cs.chromium.org/chromium/src/extensions/browser/guest_view/web_view/web_view_permission_helper.cc?rcl=b73143abfac967ceddc0fc631212d72e48ceb881&l=242
,
Aug 15
,
Aug 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3f9fba2310272a2ab50b90a61c7985599eaad6e0 commit 3f9fba2310272a2ab50b90a61c7985599eaad6e0 Author: W. James MacLean <wjmaclean@chromium.org> Date: Thu Aug 16 15:20:36 2018 Use GetOutermostWebContents() when checking media permissions. Instead of using GetOuterWebContents, which only return the immediate parent of this WebContents, use GetOutermostWebContents to check against the root of the web-contents tree, which in this case should be the app-view's web-contents. Bug: 873672 , 823021 Change-Id: I421a64be495c575d22501328ec732794abc045f4 Reviewed-on: https://chromium-review.googlesource.com/1176342 Commit-Queue: James MacLean <wjmaclean@chromium.org> Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Reviewed-by: Lucas Gadani <lfg@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#583656} [modify] https://crrev.com/3f9fba2310272a2ab50b90a61c7985599eaad6e0/content/browser/web_contents/web_contents_impl.h [modify] https://crrev.com/3f9fba2310272a2ab50b90a61c7985599eaad6e0/content/public/browser/web_contents.h [modify] https://crrev.com/3f9fba2310272a2ab50b90a61c7985599eaad6e0/extensions/browser/app_window/app_window.cc |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Aug 15