Open Bug 1553082 Opened 6 years ago Updated 2 years ago

Unused X11 code and consider removing MOZ_WIDGET_GDK

Categories

(Toolkit :: Startup and Profile System, task, P5)

task

Tracking

()

People

(Reporter: jya, Unassigned)

References

Details

In bug 1278282 the macro MOZ_WIDGET_GTK got a different meaning.

This lead to some now unused code like this:

https://searchfox.org/mozilla-central/rev/a887c90ea9c19a0b5529a1f5fa351929944887ba/toolkit/xre/nsEmbedFunctions.cpp#998

#ifdef MOZ_X11
void XRE_InstallX11ErrorHandler() {

ifdef MOZ_WIDGET_GTK

InstallGdkErrorHandler();

else

InstallX11ErrorHandler();

endif

}
#endif

Now when MOZ_X11 is set, MOZ_WIDGET_GTK is always set. We can never be in a condition where it's false. As such, in the example above, InstallX11ErrorHandler(); will never be called.

This code should be removed.

Additionally, we should consider removing the redundant MOZ_X11 / MOZ_WIDGET_GTK

Just to mention it: There are cases where MOZ_WIDGET_GTK matters to express "Linux + FreeBSD, but not Android": https://hg.mozilla.org/mozilla-central/rev/139558138e3e

Type: defect → task

This was the change that led to the path that is now never compiled.
https://hg.mozilla.org/mozilla-central/rev/07457a9823d374c3ef19b4034c6f56cc6d80bf8d#l5.10

Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.