Consider generating error code lists from ErrorList.py
Categories
(GeckoView :: General, enhancement)
Tracking
(firefox-esr91 wontfix, firefox100 wontfix, firefox101 wontfix, firefox102 fixed)
People
(Reporter: nika, Assigned: nika)
Details
Attachments
(1 file)
Currently GeckoView has code which has hard-coded xpcom error code values for network request error handling. We should consider using ErrorList.py to generate a java file which defines these errors automatically for us.
We already generate some small amount of java code at build time (https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoChildProcessServices.jinja), so there is some support for generating java files using jinja early enough in the build process.
Assignee | ||
Comment 1•2 years ago
|
||
This allows us to replace a number of magic numbers in the
WebRequestError code with automatically generated constants which are
guaranteed to be kept up to date.
This build script is able to run early enough during the build step as
generated files which take a .jinja
file as an argument are hard-coded
to be run during the pre-export phase for Android builds. As it is just
as simple python script with no other dependencies, this shouldn't
impact geckoview build performance even when using build artifacts.
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c2f1f1735dbf Generate XPCOM error code lists for Java, r=geckoview-reviewers,agi,calu
Comment 3•2 years ago
|
||
bugherder |
Comment 4•2 years ago
|
||
No need to uplift to Beta 101.
Description
•