Exclude XBL-related bits in GeckoView/Fennec builds
Categories
(GeckoView :: General, task, P3)
Tracking
(geckoview66 wontfix, firefox-esr60 wontfix, firefox66 wontfix, firefox67 wontfix, firefox68 wontfix, firefox69 wontfix, firefox70 wontfix, firefox71 fixed)
People
(Reporter: timdream, Assigned: bdahl)
References
(Blocks 3 open bugs)
Details
Attachments
(5 files, 2 obsolete files)
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!
Comment 1•6 years ago
|
||
(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.
Comment 2•6 years ago
|
||
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!
Updated•6 years ago
|
Agree, MOZ_XBL seems fine to me.
Comment 4•6 years ago
|
||
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.
Comment 5•6 years ago
|
||
Depends on D13759
Comment 6•6 years ago
|
||
bgrins, others -- if you'd like to do some initial experiments, a try push with those patches should help.
Reporter | ||
Comment 7•6 years ago
|
||
BTW, this makes remote XUL not usable on mobile.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
Comment 8•5 years ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #6)
bgrins, others -- if you'd like to do some initial experiments, a try push
with those patches should help.
Brendan started looking into this. It sounds like ifdefs through the tree wherever XBL service is used is the most straightforward approach so far.
Comment 9•5 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #8)
Brendan started looking into this. It sounds like ifdefs through the tree wherever XBL service is used is the most straightforward approach so far.
Note that Fennec will move to ESR 68:
https://docs.google.com/document/d/1oRPkwP3l7QzdQYj0Wn7d_3EfTZaakocA_i_pGKlG0dI/edit
There will be no Fennec 69 release or later, but we'll continue to support Fennec 68.x with ESR releases at least until mid-2020. We'll continue to ship GeckoView from mozilla-central/beta/release, but I assume GeckoView doesn't include any XBL code.
However, we will keep building and running tests on Fennec 69 and 70 until Fennec 68 ESR successfully ships to the Release channel. If there is a major problem with ESR 68, we will want Fennec 69-70 as a backup release option. So you can start ripping out Fennec code in the 71 Nightly cycle (starting 2019-09-02), but I would keep using #ifdefs until then.
Assignee | ||
Comment 10•5 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #9)
There will be no Fennec 69 release or later, but we'll continue to support Fennec 68.x with ESR releases at least until mid-2020. We'll continue to ship GeckoView from mozilla-central/beta/release, but I assume GeckoView doesn't include any XBL code.
GeckoView shouldn't have any XBL bindings, but all the platform code to support XBL is still there.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 11•5 years ago
|
||
Hey bz, I wanted to get your feedback before going forward...
I have a patch working that adds a MOZ_XBL define which doesn't compile anything in the dom/xbl folder and #ifdefs XBL out of most of the places it's used in the tree. I also had to add some stubs in stylo. The gecko view tests are passing, but we have a number of other android failures because XBL is still needed there. My next steps will be to address those failures, but I first wanted to check with you and see if this is a sane approach going foward. Adding some 100+ ifdefs seems less than ideal, but it could be our first steps in removing XBL.
![]() |
||
Comment 12•5 years ago
|
||
I agree that we're going to need something like this anyway for XBL removal, in the sense of having to do this audit at some point.
I don't have a problem with the number of ifdefs given that these are somewhat temporary (I know, famous last words).
Note that if we really wanted to, we could make GetAnonymousElementByAttribute completely conditional on MOZ_XBL instead of just stubbing it out ifndef MOZ_XBL. That would actually reduce the number of ifdefs a bit, I suspect, though would require preprocessing Document.webidl.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 13•5 years ago
|
||
Defaults XBL to disabled on android, but still enabled for desktop.
Assignee | ||
Comment 14•5 years ago
|
||
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.
Depends on D45612
Assignee | ||
Comment 15•5 years ago
|
||
Adds a feature "moz_xbl" that when disabled causes the XBL code in servo to
be stubbed out.
Depends on D45613
Assignee | ||
Comment 16•5 years ago
|
||
Adds a way for mochitest, reftest, and crashtests to skip XBL related
tests when XBL is disabled. Also, add an app constant so JS can
check whether XBL is enabled.
Depends on D45614
Assignee | ||
Comment 17•5 years ago
|
||
BL will be disabled on android, so these tests must be skipped.
Depends on D45615
Updated•5 years ago
|
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Pushed by bdahl@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/36b84f0fb2d1 Add build option for disabling XBL. r=chmanchester https://hg.mozilla.org/integration/autoland/rev/4a104e817b35 Only build XBL related code when MOZ_XBL is defined. r=bzbarsky https://hg.mozilla.org/integration/autoland/rev/02740878ddd6 Add way to disable XBL in servo. r=emilio https://hg.mozilla.org/integration/autoland/rev/5a2309893b3a Support disabling XBL related tests. r=gbrown https://hg.mozilla.org/integration/autoland/rev/75db6763ead5 Skip all XBL related tests when XBL is disabled. r=bzbarsky
Comment 19•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/36b84f0fb2d1
https://hg.mozilla.org/mozilla-central/rev/4a104e817b35
https://hg.mozilla.org/mozilla-central/rev/02740878ddd6
https://hg.mozilla.org/mozilla-central/rev/5a2309893b3a
https://hg.mozilla.org/mozilla-central/rev/75db6763ead5
Comment 20•5 years ago
|
||
firefox70=wontfix because we don't need to uplift these GeckoView XBL patches to Beta (70).
Comment 21•5 years ago
|
||
Hi Brendan!
Since this bug landed, artifact builds as well as windows aarch64 builds no longer have XBL enabled.
This makes try pushes using artifact builds a bit noisy, because several tests still using XBL are failing.
eg devtools/client/inspector/test/browser_inspector_highlighter-xbl.js, dom/base/test/chrome/test_bug683852.xul
Any idea how to fix this? Or should we just make sure that those tests are skipped if !xbl
?
(edit: seems that skip-if = !xbl
doesn't do the trick here, also some tests skipped if !xbl
seem to pass on artifact builds, so not sure exactly what is wrong with artifact builds / xbl)
Assignee | ||
Comment 22•5 years ago
|
||
I think xbl is being disabled on artifact builds because of when='--enable-compile-environment'
in config, but I don't understand why it's disabled for aarch64 builds. I'll be fixing this over in bug 1587662.
Updated•5 years ago
|
Description
•