Closed Bug 1881636 Opened 7 months ago Closed 6 months ago

[Gecko iOS] Use BrowserEngineKit to start content processes

Categories

(Firefox for iOS :: General, enhancement)

Other
iOS
enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: nika, Assigned: nika)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files, 2 obsolete files)

Apple has released new APIs to allow building alternative browser engines for iOS in the EU. This patch is to track an initial prototype implementation of launching child processes in Gecko-iOS's ExampleBrowser using these new BrowserEngineKit APIs.

Documentation: https://developer.apple.com/documentation/browserenginekit

This is a helper smart pointer type for working with Darwin OS data structures.
The code has been directly adapted from WebKit's OSObjectPtr type. This will be
used on iOS to manage the lifecycles of xpc objects.

The existing behaviour attempted to access UIKit from within a content process,
which would not work correctly. After some testing, it turned out the existing
code also always returned a null string, so it's been hard-coded to a temporary value.

Depends on D202522

This new logic is based on the regex from android-components, and allows
entering internal URLs like about:about into the URL bar, which can be useful
when testing.

Depends on D202523

These changes switch Gecko-iOS to using BrowserEngineKit's ExtensionKit-based
processes to start content processes on iOS. These processes are started with
an initial xpc connection, which is then used to communicate a command line,
initial file descriptors and environment variables before invoking
content_process_main.

The XPC connection is not used further after the bootstrap message, which seems
to roughly match how WebKit uses these APIs.

3 separate extensions have been added for Networking, Rendering and WebContent,
as is required by iOS. Currently these appear to fully duplicate XUL and its
resources between each extension, despite the code being all bundled into a
shared framework.

Depends on D202524

Blocks: 1883453
Attachment #9382172 - Attachment is obsolete: true
Attachment #9382173 - Attachment is obsolete: true
Duplicate of this bug: 1884272
Group: mozilla-employee-confidential
Attachment #9382171 - Attachment description: Bug 1881636 - Part 1: Add DarwinObjectPtr, r=glandium! → Bug 1881636 - Part 1: Add DarwinObjectPtr,
Attachment #9382174 - Attachment description: Bug 1881636 - Part 4: Use BrowserEngineKit to start content processes, r=glandium! → Bug 1881636 - Part 3: Implement IosProcessLauncher::DoLaunch.
Attachment #9392411 - Attachment description: Bug 1881636 - Part 2 - Expose SetClientChannelFd, SetPrefsFd and SetPrefMapFd on iOS. → Bug 1881636 - Part 2: Expose SetClientChannelFd, SetPrefsFd and SetPrefMapFd on iOS.
Attachment #9392411 - Attachment description: Bug 1881636 - Part 2: Expose SetClientChannelFd, SetPrefsFd and SetPrefMapFd on iOS. → Bug 1881636 - Part 2 - Expose SetClientChannelFd, SetPrefsFd and SetPrefMapFd on iOS.
Blocks: 1886607
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/a8260a45c5c9 Part 1: Add DarwinObjectPtr, r=glandium,sylvestre https://hg.mozilla.org/integration/autoland/rev/71179f624966 Part 2 - Expose SetClientChannelFd, SetPrefsFd and SetPrefMapFd on iOS. r=ipc-reviewers,nika https://hg.mozilla.org/integration/autoland/rev/5079ead12099 Part 3: Implement IosProcessLauncher::DoLaunch. r=glandium,ipc-reviewers,jld https://hg.mozilla.org/integration/autoland/rev/babb5943701f apply code formatting via Lando
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: