Closed Bug 1649595 Opened 4 years ago Closed 4 years ago

CrashMonitor.jsm imports OS.File during startup

Categories

(Toolkit Graveyard :: OS.File, task)

Tracking

(firefox89 fixed)

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: beth, Assigned: beth)

References

Details

Attachments

(1 file)

According to this startup profile, CrashMonitor.jsm runs during startup and imports osfile.jsm. We should migrate this to the new IOUtils replacement for osfile.jsm when possible.

Stack:

(root) []
XREMain::XRE_main []
XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) [libxul.so]
XREMain::XRE_mainRun() [libxul.so]
nsXREDirProvider::DoStartup() [libxul.so]
NS_CreateServicesFromCategory(char const*, nsISupports*, char const*, char16_t const*) [libxul.so]
nsCOMPtr_base::assign_from_gs_contractid(nsGetServiceByContractID, nsID const&) [libxul.so]
nsGetServiceByContractID::operator()(nsID const&, void**) const [libxul.so]
mozilla::xpcom::CreateInstanceImpl(mozilla::xpcom::ModuleID, nsISupports*, nsID const&, void**) [libxul.so]
mozilla::xpcom::ConstructJSMComponent(nsTSubstring<char> const&, char const*, nsISupports**) [libxul.so]
mozJSComponentLoader::Import(JSContext*, nsTSubstring<char> const&, JS::MutableHandle<JSObject*>, JS::MutableHandle<JSObject*>, bool) [libxul.so]
component loader load module []
mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo&, nsIFile*, JS::MutableHandle<JSObject*>, JS::MutableHandle<JSScript*>, char**, bool, JS::MutableHandle<JS::Value>) [libxul.so]
js::ExecuteInJSMEnvironment(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>) [libxul.so]
js::ExecuteInJSMEnvironment(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, JS::Handle<JS::StackGCVector<JSObject*, js::TempAllocPolicy> >) [libxul.so]
ExecuteInExtensibleLexicalEnvironment(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>) [libxul.so]
js::RunScript []
resource://gre/modules/nsCrashMonitor.jsm []
js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) [libxul.so]
Interpret(JSContext*, js::RunState&) [libxul.so]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
ChromeUtils.import []
mozilla::dom::ChromeUtils_Binding::import(JSContext*, unsigned int, JS::Value*) [libxul.so]
ChromeUtils::Import resource://gre/modules/CrashMonitor.jsm []
mozilla::dom::ChromeUtils::Import(mozilla::dom::GlobalObject const&, nsTSubstring<char16_t> const&, mozilla::dom::Optional<JS::Handle<JSObject*> > const&, JS::MutableHandle<JSObject*>, mozilla::ErrorResult&) [libxul.so]
mozJSComponentLoader::Import(JSContext*, nsTSubstring<char> const&, JS::MutableHandle<JSObject*>, JS::MutableHandle<JSObject*>, bool) [libxul.so]
component loader load module []
mozJSComponentLoader::ObjectForLocation(ComponentLoaderInfo&, nsIFile*, JS::MutableHandle<JSObject*>, JS::MutableHandle<JSScript*>, char**, bool, JS::MutableHandle<JS::Value>) [libxul.so]
js::ExecuteInJSMEnvironment(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>) [libxul.so]
js::ExecuteInJSMEnvironment(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, JS::Handle<JS::StackGCVector<JSObject*, js::TempAllocPolicy> >) [libxul.so]
ExecuteInExtensibleLexicalEnvironment(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>) [libxul.so]
js::RunScript []
> resource://gre/modules/CrashMonitor.jsm []
js::ExecuteKernel(JSContext*, JS::Handle<JSScript*>, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::AbstractFramePtr, JS::MutableHandle<JS::Value>) [libxul.so]
Interpret(JSContext*, js::RunState&) [libxul.so]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
ChromeUtils.import []
mozilla::dom::ChromeUtils_Binding::import(JSContext*, unsigned int, JS::Value*) [libxul.so]
> ChromeUtils::Import resource://gre/modules/osfile.jsm []
mozilla::dom::ChromeUtils::Import(mozilla::dom::GlobalObject const&, nsTSubstring<char16_t> const&, mozilla::dom::Optional<JS::Handle<JSObject*> > const&, JS::MutableHandle<JSObject*>, mozilla::ErrorResult&) [libxul.so]
mozJSComponentLoader::Import(JSContext*, nsTSubstring<char> const&, JS::MutableHandle<JSObject*>, JS::MutableHandle<JSObject*>, bool) [libxul.so]
profiler_get_backtrace() [libxul.so]
Registers::SyncPopulate() [libxul.so]
Assignee: nobody → krourke
Status: NEW → ASSIGNED
Attachment #9170766 - Attachment description: Bug 1649595: Use IOUtils instead of OS.File in CrashMonitor.jsm r?barret → Bug 1649595: Use IOUtils instead of OS.File in CrashMonitor.jsm r?barret,froydnj
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/73bdddd96664 Use IOUtils instead of OS.File in CrashMonitor.jsm r=barret
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df182a7545bb Use IOUtils instead of OS.File in CrashMonitor.jsm r=barret
Backout by nerli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0b58d4793d6b Backed out 3 changesets (bug 1649595, bug 1649596, bug 1649593) for causing failures in ExtensionParent.jsm

I'm taking these bugs over from :krourke since his internship is over.

Assignee: mail → brennie

This also looks like it uses OS.Path.join, so we'll need to remove that as well https://searchfox.org/mozilla-central/source/toolkit/components/crashmonitor/CrashMonitor.jsm#85

Depends on: 1671035

The shutdown blocker code needs to be updated to allow IO to run until the end of the before profile change phase (which is what OSFile does), instead of shutting off all incoming IO requests at the beginning of the phase (what IOUtils currently does).

Depends on: 1672431
Depends on: 1674311
Blocks: 1649601
No longer blocks: 1649601
Attachment #9170766 - Attachment description: Bug 1649595: Use IOUtils instead of OS.File in CrashMonitor.jsm r?barret,froydnj → Bug 1649595: Use IOUtils instead of OS.File in CrashMonitor.jsm r?gijs
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c5e39f7d50c0 Use IOUtils instead of OS.File in CrashMonitor.jsm r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: