Exclude XBL-related bits in GeckoView/Fennec builds

NEW
Unassigned

Status

enhancement
P3
normal
5 months ago
10 hours ago

People

(Reporter: timdream, Unassigned, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

With in-content XBL bindings pref'd off, we are very close to getting rid of all XBL usage in Fennec and GeckoView.

The one last remaining known usage is <xul:browser> and will be addressed in bug 1441935.

Once the XBL usage is gone, we should be able to cash out these work in terms of build size and/or performance by excluding XBL-related machinery from the build.

I don't have a concrete idea on how to approach this -- perhaps we want to |#ifndef ANDROID| everything related, or if there can be something less tedious.

I am not entirely sure how to measure the potential benefit without actually doing it either. Brian suggested stubbing the classes and measure the apk size; if that's the right avenue to approach this problem we could just do that.

I tentatively set this to depend on bug 1507895 because we don't want the browser to break if the pref is turned off. However, I don't see why we couldn't force it on on Android if we want to.

Please share your ideas!
(In reply to Tim Guan-tin Chien [:timdream] (please needinfo) from comment #0)
> With in-content XBL bindings pref'd off, we are very close to getting rid of
> all XBL usage in Fennec and GeckoView.
> 
> The one last remaining known usage is <xul:browser> and will be addressed in
> bug 1441935.
> 
> Once the XBL usage is gone, we should be able to cash out these work in
> terms of build size and/or performance by excluding XBL-related machinery
> from the build.
> 
> I don't have a concrete idea on how to approach this -- perhaps we want to
> |#ifndef ANDROID| everything related, or if there can be something less
> tedious.

I would envision a new directive `#ifdef MOZ_XBL`, since we'll eventually want to shut this off for the rest of the browser as well.
Strongly prefer MOZ_XBL to generic platform flags: it's really hard to search for generic flags, and even harder to reason about why they're the option used!
Agree, MOZ_XBL seems fine to me.
Defaults to MOZ_XBL=1 for !mobile/android and unset for
mobile/android.

We'll progressively enclose more and more native code in #ifdef
MOZ_XBL blocks until we can unset the flag globally and remove all of
that code.
bgrins, others -- if you'd like to do some initial experiments, a try push with those patches should help.
Flags: needinfo?(bgrinstead)
BTW, this makes remote XUL not usable on mobile.

Updated

4 months ago
Product: Firefox for Android → GeckoView
See Also: → 1545496
You need to log in before you can comment on or make changes to this bug.