Closed Bug 1839531 Opened 2 years ago Closed 2 years ago

Don't check the pref javascript.options.asyncstack during shutdown

Categories

(Core :: Gecko Profiler, task)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

In a recent Linux64 debug run, this was the most common warning, with over 246,708 occurences:
WARNING: NS_ENSURE_TRUE(Preferences::InitStaticMembers()) failed: file modules/libpref/Preferences.cpp:4682

I investigated this warning locally when running a single Mochitest plain directory, and every one of the dozen or so failures was from PreRecordMetaInformation() trying and failing to get the pref javascript.options.asyncstack during shutdown.

The callers know whether they are happening during shutdown or not, so I've added an argument that says if shutdown is happening or not. If it is, don't check the pref.

This is a bit silly, but I think it would be a nice improvement for developers to eliminate what appears to be the most common warning in debug logs.

Getting a preference will always fail during shutdown, so avoid doing it.
The goal here is to avoid what is perhaps the most common source of warning
spam in logs in debug builds.

Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b277f93cb9d0 Don't check the pref javascript.options.asyncstack during shutdown. r=canaltinova
Blocks: logspam
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: