Open Bug 1900106 Opened 4 months ago Updated 3 months ago

libxul C++ constructors run before setupGeckoEnvironment() can set up the enviroment

Categories

(GeckoView :: General, defect, P3)

All
Android
defect

Tracking

(Not tracked)

People

(Reporter: jrmuizel, Unassigned)

References

(Depends on 1 open bug)

Details

GeckoView has the ability to setup environment variables via a config file. Currently we're loading libxul via glean (bug 1892234) instead of explicitly in GeckoLoader. This causes us to run C++ constructors before we setup the environment variables that we want for Gecko.

We set up the appropriate environment variables for gecko here:
https://searchfox.org/mozilla-central/rev/fc76676f61ee37b4c5420649cad6677164a29405/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java#116

Then explicitly load libxul here: https://searchfox.org/mozilla-central/rev/fc76676f61ee37b4c5420649cad6677164a29405/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java#179

I noticed this because it was happening for DefaultJitOptions

It's also worth noting that this causes inconsistent results for the environment variables in the parent process and the content process.

Depends on: 1892234

The severity field is not set for this bug.
:owlish, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bugzeeeeee)
Severity: -- → S4
Flags: needinfo?(bugzeeeeee)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.