Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-11-21 21:09:29 +08:00
commit 310c05b97a
177 changed files with 514 additions and 4888 deletions

View file

@ -264,27 +264,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);
@ -399,7 +392,6 @@ child:
async AppInfo(nsCString version, nsCString buildID, nsCString name, nsCString UAName,
nsCString ID, nsCString vendor);
async AppInit();
/**
* Send ServiceWorkerRegistrationData to child process.
@ -526,15 +518,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,
@ -547,7 +537,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);
async CreateGMPService();
@ -755,9 +745,6 @@ parent:
// Notify the parent of the presence or absence of private docshells
async PrivateDocShellsExist(bool aExist);
// Tell the parent that the child has gone idle for the first time
async FirstIdle();
async AudioChannelServiceStatus(bool aActiveTelephonyChannel,
bool aContentOrNormalChannel,
bool aAnyActiveChannel);