Porting code from later Mozilla releases

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

User avatar
ownedbywuigi
Fanatic
Fanatic
Posts: 242
Joined: 2026-03-09, 21:48
Location: United Kingdom

Porting code from later Mozilla releases

Post by ownedbywuigi » 2026-04-28, 06:53

Days without stupid ideas from wuggy: 0

I’m considering fully removing Rust from Firefox 68 and smoothing over the differences to make it easier to port the beneficial additions to UXP (particularly the URL handler, i want that code so fucking bad)

Good idea or terrible idea? :twisted:
Lead Dactyloidae developer.
Feedback needed! https://forum.palemoon.org/viewtopic.ph ... 30#p272630

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1749
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Porting code from later Mozilla releases

Post by athenian200 » 2026-04-28, 07:37

Well, one of the reasons why the 52ESR codebase was used is precisely because later codebases are too entangled with Rust, and also removed too much XUL for it to be easy for us to use them. You see, before UXP, the way we used to keep Pale Moon moving forward was by moving to a newer Firefox base and porting all our code over, ripping out everything we didn't want and adding back stuff they removed we did want. In fact, it used to be the case that whenever we needed something big, we would just get it from Mozilla.

So your idea isn't really crazy... in fact it's what Pale Moon used to do before UXP. The reason why we're fighting so hard to keep UXP up to date rather than just rebase on newer Firefox is because there's so much of newer Firefox that makes wrong assumptions or goes in a direction we don't want. The foundation is half-Rust, e10s, and no XUL or NPAPI. Plus, they do the standard modern dev thing and use Clang for everything, while we prefer to use MSVC on Windows and GCC on Linux.

But yeah, it is worth noting that Pale Moon did not originally set out to be a hard fork of Mozilla... it's just that at some point our goals and their goals diverged to the point a hard fork was needed. Even with that being the case, we do backport quite a bit of code from Mozilla even today. It's just that we have to do it patch by patch while making sure it doesn't bring in assumptions that aren't true for our codebase, or doesn't negatively impact XUL, etc.

I genuinely do wonder to this day if 52ESR was the very latest fork point we could have picked, though. At this point I don't think rebasing nearly a decade of work on a newer Firefox would make much sense, but there's definitely stuff from 53-60 that I'm very sure we would have wanted and gladly taken if we could have gotten it easily.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Moonchild
Project founder
Project founder
Posts: 39260
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Porting code from later Mozilla releases

Post by Moonchild » 2026-04-28, 08:38

There is no point doing a rebase on 68 and throwing away everything that was ported from 69-150 in the process and having to re-do all that (if even possible).
If that's what you want to do, then you'd have to move away from what we're doing here. That's fine with us, too. You can do with your time what you want :) If you think 68 works better for what you want to create then by all means, go right ahead! Just try to also not create an insecure piece of software in the process, if you do. i.e. you'll have to go through every sec bug since 68 and port what is applicable on that base (which will be different from ours). I honestly don't think that would be smart and you would be much better off in that case basing on the latest ESR, instead.
"Praise from a narcissistic person is always a poison dart. They don't share the stage, so discernment matters." - Dr. Ramani
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
ownedbywuigi
Fanatic
Fanatic
Posts: 242
Joined: 2026-03-09, 21:48
Location: United Kingdom

Re: Porting code from later Mozilla releases

Post by ownedbywuigi » 2026-04-28, 09:06

I don’t mean doing a total rebase, but rather porting whatever beneficial changes from later Firefox releases that don’t interfere with our code.
Lead Dactyloidae developer.
Feedback needed! https://forum.palemoon.org/viewtopic.ph ... 30#p272630

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1749
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Porting code from later Mozilla releases

Post by athenian200 » 2026-04-28, 09:32

ownedbywuigi wrote:
2026-04-28, 09:06
I don’t mean doing a total rebase, but rather porting whatever beneficial changes from later Firefox releases that don’t interfere with our code.
Umm... but wouldn't that just be what we're already doing when we backport bugs?

Now granted, one thing we haven't done is literally go through every patch Mozilla applied since our fork point up to 68 and evaluate it for inclusion, if that's what you meant. But seriously, given the sheer volume of stuff Mozilla takes and how much of it is just moving code around or backing out things that didn't work, there's a surprising amount of junk there is to sift through to get to the useful changes... it can be overwhelming at times.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
ownedbywuigi
Fanatic
Fanatic
Posts: 242
Joined: 2026-03-09, 21:48
Location: United Kingdom

Re: Porting code from later Mozilla releases

Post by ownedbywuigi » 2026-04-28, 09:49

athenian200 wrote:
2026-04-28, 09:32
...there's a surprising amount of junk there is to sift through to get to the useful changes.
I'll get started on that then. Granted I'll have to do some TLC on the codebase before porting anything (FIrefox's), but if it gets Goanna to a better state in terms of the 'problematic' websites (such as yeezy), good enough.
Lead Dactyloidae developer.
Feedback needed! https://forum.palemoon.org/viewtopic.ph ... 30#p272630

User avatar
Basilisk-Dev
Astronaut
Astronaut
Posts: 636
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: Porting code from later Mozilla releases

Post by Basilisk-Dev » 2026-04-30, 02:47

athenian200 wrote:
2026-04-28, 07:37
Plus, they do the standard modern dev thing and use Clang for everything, while we prefer to use MSVC on Windows and GCC on Linux.
FWIW all Basilisk releases other than Windows are built with Clang. I found it to both compile faster and have noticeably better performance, even before I set it to use ThinLTO.
Basilisk Project Owner

viewtopic.php?f=61&p=230756