Closed Bug 1684999 Opened 4 years ago Closed 4 years ago

Allow PathUtils.getProfileDir() to be called off main thread if PathUtils is not instantiated

Categories

(Toolkit Graveyard :: OS.File, defect)

defect

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: emmamalysz, Assigned: barret)

References

Details

Attachments

(1 file)

During shutdown, we are unable to use await PathUtils.getProfileDir() due to the error here: https://searchfox.org/mozilla-central/rev/f8a41209af503016e78278774052d48d8c52b91c/xpcom/base/ClearOnShutdown.h#125.

Should we remove that assertion?

(In reply to Emma Malysz from comment #0)

During shutdown, we are unable to use await PathUtils.getProfileDir() due to the error here: https://searchfox.org/mozilla-central/rev/f8a41209af503016e78278774052d48d8c52b91c/xpcom/base/ClearOnShutdown.h#125.

Should we remove that assertion?

I somewhat suspect that https://searchfox.org/mozilla-central/rev/ef900cd2258d4c5d968093f612f807d96e6e7c98/dom/system/PathUtils.cpp#310 should be wrapped in a dispatch-to-mainthread, but I could be wrong. Barret?

Flags: needinfo?(brennie)

PathUtils gets cleared at the ShutdownFinal stage, at which point we no longer have XPCOM, so it is unlikely this is happening at shutdown. It is more likely that this is instead running off main thread before PathUtils is instantiated.

Flags: needinfo?(brennie)
Summary: Allow PathUtils.getProfileDir() to run during shutdown → Allow PathUtils.getProfileDir() to be called off main thread if PathUtils is not instantiated
Assignee: nobody → brennie
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3587cb6cc383 Call RunOnShutdown on main thread in PathUtils r=emalysz
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/624e4a66352f Call RunOnShutdown on main thread in PathUtils r=emalysz
Flags: needinfo?(brennie)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: