In file dom/media/AutoplayPolicy.cpp
Used only by autoplay code.
Returns Document of same-type root (the “approver” doc)
- Checks “IsExtensionPage” on approver.
- IsExtensionPage accesses principal.
- Also calls SiteAutoPlayPerm on “approver” document, as with IsAllowedToPlayInternal
IPC is likely OK here. Autoplay requests are not frequent. When the same-type-root is in process, we can still use this code, and otherwise use IPC to get the information from the other document.
Change to use BrowsingContext, checking for out-of-process “approver” doc, and if so forwarding to an IPC-call to perform “IsExtensionPage” and “SiteAutoPlayPerm” instead of performing in-process.