mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47:31 +09:00
Issue #2653 - Part 1: Initial cleanup of AppId and isolated mozbrowser.
This removes a lot of the plumbing for having the platform embed itself through IPC which was required for B2G running the browser as both shell and browser application.
This commit is contained in:
parent
a6c54d0736
commit
7b6e3a2d4a
77 changed files with 295 additions and 1799 deletions
|
|
@ -272,27 +272,20 @@ both:
|
|||
// The child creates the PBrowser as part of
|
||||
// TabChild::BrowserFrameProvideWindow (which happens when the child's
|
||||
// content calls window.open()), and the parent creates the PBrowser as part
|
||||
// of ContentParent::CreateBrowserOrApp.
|
||||
// of ContentParent::CreateBrowser.
|
||||
//
|
||||
// When the parent constructs a PBrowser, the child trusts the app token and
|
||||
// other attributes it receives from the parent. In that case, the
|
||||
// context should be FrameIPCTabContext.
|
||||
// When the parent constructs a PBrowser, the child trusts the attributes it
|
||||
// receives from the parent. In that case, the context should be
|
||||
// FrameIPCTabContext.
|
||||
//
|
||||
// When the child constructs a PBrowser, the parent doesn't trust the app
|
||||
// token it receives from the child. In this case, context must have type
|
||||
// PopupIPCTabContext. The browser created using a PopupIPCTabContext has
|
||||
// the opener PBrowser's app-id and containing-app-id. The parent checks
|
||||
// that if the opener is a browser element, the context is also for a
|
||||
// browser element.
|
||||
//
|
||||
// This allows the parent to prevent a malicious child from escalating its
|
||||
// privileges by requesting a PBrowser corresponding to a highly-privileged
|
||||
// app; the child can only request privileges for an app which the child has
|
||||
// access to (in the form of a TabChild).
|
||||
// When the child constructs a PBrowser, the parent doesn't trust the
|
||||
// attributes it receives from the child. In this case, context must have
|
||||
// type PopupIPCTabContext. The parent checks that if the opener is a
|
||||
// browser element, the context is also for a browser element.
|
||||
//
|
||||
// Keep the last 3 attributes in sync with GetProcessAttributes!
|
||||
async PBrowser(TabId tabId, IPCTabContext context, uint32_t chromeFlags,
|
||||
ContentParentId cpId, bool isForApp, bool isForBrowser);
|
||||
ContentParentId cpId, bool isForBrowser);
|
||||
|
||||
async PBlob(BlobConstructorParams params);
|
||||
|
||||
|
|
@ -535,15 +528,13 @@ parent:
|
|||
* startup. (The message is sync to allow the content process to
|
||||
* control when it receives the information.)
|
||||
*
|
||||
* |id| is a unique ID among all subprocesses. When |isForApp &&
|
||||
* isForBrowser|, we're loading <browser> for an app. When
|
||||
* |isForBrowser|, we're loading <browser>. When |!isForApp &&
|
||||
* !isForBrowser|, we're probably loading <xul:browser remote>.
|
||||
* |id| is a unique ID among all subprocesses. When
|
||||
* |isForBrowser|, we're loading <browser> or <xul:browser remote>.
|
||||
*
|
||||
* Keep the return values in sync with PBrowser()!
|
||||
*/
|
||||
sync GetProcessAttributes()
|
||||
returns (ContentParentId cpId, bool isForApp, bool isForBrowser);
|
||||
returns (ContentParentId cpId, bool isForBrowser);
|
||||
sync GetXPCOMProcessAttributes()
|
||||
returns (bool isOffline, bool isConnected, int32_t captivePortalState,
|
||||
bool isLangRTL,
|
||||
|
|
@ -556,7 +547,7 @@ parent:
|
|||
sync CreateChildProcess(IPCTabContext context,
|
||||
ProcessPriority priority,
|
||||
TabId openerTabId)
|
||||
returns (ContentParentId cpId, bool isForApp, bool isForBrowser, TabId tabId);
|
||||
returns (ContentParentId cpId, bool isForBrowser, TabId tabId);
|
||||
sync BridgeToChildProcess(ContentParentId cpId);
|
||||
|
||||
#ifdef MOZ_GMP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue