ProfileAge.jsm imports OS.File during startup
Categories
(Toolkit Graveyard :: OS.File, task, P3)
Tracking
(firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: barret, Assigned: barret)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
text/x-phabricator-request
|
Details |
According to this startup profile, CrashManager.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]
Category observer notification - profile-after-change (TelemetryStartup) []
NS_CreateServicesFromCategory(char const*, nsISupports*, char const*, char16_t const*) [libxul.so]
SharedStub [libxul.so]
PrepareAndDispatch [libxul.so]
XPCWrappedJS method call []
nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*) [libxul.so]
JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [libxul.so]
js::RunScript []
TelemetryStartup.prototype.observe [resource://gre/modules/TelemetryStartup.jsm:28:45]
annotateEnvironment [resource://gre/modules/TelemetryStartup.jsm:43:28]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
Interpret(JSContext*, js::RunState&) [libxul.so]
<name omitted> [libxul.so]
js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) [libxul.so]
js::RunScript []
get currentEnvironment [resource://gre/modules/TelemetryEnvironment.jsm:105:24]
getGlobal [resource://gre/modules/TelemetryEnvironment.jsm:97:18]
EnvironmentCache [resource://gre/modules/TelemetryEnvironment.jsm:958:25]
_updateProfile [resource://gre/modules/TelemetryEnvironment.jsm:1656:22]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
Interpret(JSContext*, js::RunState&) [libxul.so]
js::NativeGetExistingProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<js::NativeObject*>, JS::Handle<js::Shape*>, JS::MutableHandle<JS::Value>) [libxul.so]
js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) [libxul.so]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
mozilla::dom::module_getter::ModuleGetter(JSContext*, unsigned int, JS::Value*) [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/ProfileAge.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]
Comment 1•4 years ago
|
||
One of the usages of OS.File here is for a directory iterator. Currently, IOUtils doesn't have an analogous interface for directory iteration.
Comment 2•4 years ago
|
||
Prior to this change, getOldestProfileTimestamp(profilePath, log)
would
attempt to report the oldest timestamp by creation time on macOS and Windows,
falling back to last modified time. On Linux, where there is no concept of a
creation time, last modified time was always used.
As a consequence of migrating to IOUtils, we no longer have a way to obtain the
creation date of a file. Instead, we now always use the last modified time.
Depends on D87875
Updated•4 years ago
|
Comment 3•4 years ago
|
||
In order to migrate to IOUtils without any behavioural changes in ProfileAge.jsm
, we will need a way to get the file creation time.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D96890
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Backed out changeset c8797f2b2e98 (Bug 1649598) for causing xpcshell failures in test_shutdown_early.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/2a892f5ef4c2c0c9b725ddf3e0e4ab0b46dd1892
Push with failures:
https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=W-kABDbvRbqjhbdcBqymjg.0&revision=c8797f2b2e98f89ddf8f9b67da5f714579d72e13&searchStr=xpcshell
Failure log: https://treeherder.mozilla.org/logviewer?job_id=327107015&repo=autoland&lineNumber=3895
Comment 9•4 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•