MrOtherGuy / fx-autoconfig

Load custom javascript in browser context
Mozilla Public License 2.0
164 stars 10 forks source link

Crashes in Content Processes starting in Firefox 111 #27

Open tomrittervg opened 1 year ago

tomrittervg commented 1 year ago

Users of Nightly 111 may have started experiencing content process crashes in the past 2 days. Once 111 goes to Beta/Release, users on Beta or Release may start experiencing incorrect behavior.

This is because I landed 1811294 which will cause content process crashes when dynamically named string preferences (i.e. preferences that aren't specified in prefs.js or StaticPrefList) are accessed in the content process. I'm here because we just got crash reports for one user accessing userChrome.searchSelectionShortcut.keycode which I know is a userchrome thing.

There are preferences that affect the crashing behavior referenced in that bug. As before, Mozilla's policy is that userschrome stuff is not supported, so we're not going to go out of our way to make things work* and we don't recommend you disable security settings. But at the same time we appreciate all of our users and as one hacker to another(s) - I wanted to give you a head's up.

* well actually, we've been going really far out of our way for a while, but there are limits

I also left this comment at https://github.com/xiaoxiaoflood/firefox-scripts/issues/241 which is where I frequently post updates for userchrome stuff.

MrOtherGuy commented 1 year ago

Thanks for the heads up Tom! I really appreciate it. I'll definitely pin this issue.

As I understand, the parent process isn't affected at all by that change, is that correct? So, scripts in this repository shouldn't immediately be affected since we don't touch content processes at all I don't think. Thus if someone is affected by this change then what they need to do is to change how their content process stuff accesses prefs. I see aminomancer has a few possible options for that.

tomrittervg commented 1 year ago

Yes, that's correct - this pref work never crashes the parent process. (I mean, I put new code in the parent process, and code has bugs, but we're not aware of any crashes and we're not crashing there intentionally for this work.*)

* I am pursuing work mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1766323#c5 that can crash the parent process though, and this is very relevant to userchrome stuff but I don't understand how we're still getting telemetry.