DownloadIntegration.jsm imports OS.File during startup
Categories
(Toolkit Graveyard :: OS.File, task)
Tracking
(firefox87 fixed)
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: barret, Assigned: emmamalysz)
References
(Regressed 1 open bug)
Details
Attachments
(1 file)
According to this startup profile, DownloadIntegration.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]
nsAppStartup::Run() [libxul.so]
nsBaseAppShell::Run() [libxul.so]
MessageLoop::Run() [libxul.so]
mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [libxul.so]
nsThread::ProcessNextEvent(bool, bool*) [libxul.so]
mozilla::ipc::MessageChannel::MessageTask::Run() [libxul.so]
mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) [libxul.so]
mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) [libxul.so]
PBackgroundIDBRequest::Msg___delete__ []
mozilla::dom::indexedDB::PBackgroundIDBRequestChild::OnMessageReceived(IPC::Message const&) [libxul.so]
mozilla::dom::indexedDB::BackgroundRequestChild::Recv__delete__(mozilla::dom::indexedDB::RequestResponse&&) [libxul.so]
IndexedDB:SetResultAndDispatchSuccessEvent []
mozilla::dom::indexedDB::BackgroundRequestChild::HandleResponse(mozilla::dom::indexedDB::SerializedStructuredCloneReadInfo&&) [libxul.so]
mozilla::dom::indexedDB::(anonymous namespace)::detail::DispatchSuccessEvent(RefPtr<mozilla::dom::IDBRequest> const&, mozilla::SafeRefPtr<mozilla::dom::IDBTransaction> const&, RefPtr<mozilla::dom::Event> const&) [libxul.so]
mozilla::dom::EventTarget::DispatchEvent(mozilla::dom::Event&, mozilla::ErrorResult&) [libxul.so]
mozilla::DOMEventTargetHelper::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) [libxul.so]
mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) [libxul.so]
EventDispatcher::Dispatch []
EventDispatcher::Dispatch success []
mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) [libxul.so]
mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) [libxul.so]
mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) [libxul.so]
<name omitted> [libxul.so]
promise callback []
mozilla::PromiseJobRunnable::Run(mozilla::AutoSlowOperation&) [libxul.so]
mozilla::dom::PromiseJobCallback::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::ErrorResult&) [libxul.so]
JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [libxul.so]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
PromiseReactionJob(JSContext*, unsigned int, JS::Value*) [libxul.so]
AsyncFunctionResume(JSContext*, JS::Handle<js::AsyncFunctionGeneratorObject*>, ResumeKind, JS::Handle<JS::Value>) [libxul.so]
js::CallSelfHostedFunction(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) [libxul.so]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [libxul.so]
js::RunScript []
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
AsyncFunctionNext [self-hosted:688:26]
0xff4eaa5ea9f []
js::jit::InterpretResume(JSContext*, JS::Handle<JSObject*>, JS::Value*, JS::MutableHandle<JS::Value>) [libxul.so]
js::CallSelfHostedFunction(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) [libxul.so]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [libxul.so]
js::RunScript []
InterpretGeneratorResume [self-hosted:1146:33]
initializePublicDownloadList [resource://gre/modules/DownloadIntegration.jsm:231:36]
> loadPublicDownloadListFromStore [resource://gre/modules/DownloadIntegration.jsm:260:39]
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]
profiler_get_backtrace() [libxul.so]
Registers::SyncPopulate() [libxul.so]
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Pushed by emalysz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/79484a596fa1 Remove OS.File usage from DownloadIntegration.jsm r=barret
Comment 3•3 years ago
|
||
Backed out for failures on test_DownloadCore.js
backout: https://hg.mozilla.org/integration/autoland/rev/29f93c17253e2fd3118ba85bfaf0427e4610c192
failure log: https://treeherder.mozilla.org/logviewer?job_id=324784345&repo=autoland&lineNumber=4057
[task 2020-12-17T05:41:02.032Z] 05:41:02 INFO - TEST-START | toolkit/components/downloads/test/unit/test_DownloadCore.js
[task 2020-12-17T05:41:02.415Z] 05:41:02 WARNING - TEST-UNEXPECTED-FAIL | toolkit/components/downloads/test/unit/test_DownloadCore.js | xpcshell return code: 0
[task 2020-12-17T05:41:02.416Z] 05:41:02 INFO - TEST-INFO took 382ms
[task 2020-12-17T05:41:02.416Z] 05:41:02 INFO - >>>>>>>
Comment 4•3 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:emalysz, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by emalysz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/43f2f5614583 Remove OS.File usage from DownloadIntegration.jsm and respect umask in IOUtils::SetPermissions r=barret
Comment 6•3 years ago
|
||
Backed out for bustages on IOUtils.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/73234f99936238ab1afe3a19ef4c73ff8a75d79e
Log link: https://treeherder.mozilla.org/logviewer?job_id=326767380&repo=autoland&lineNumber=13221
Pushed by emalysz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4934ec1fbb6f Remove OS.File usage from DownloadIntegration.jsm and respect umask in IOUtils::SetPermissions r=barret
Backout by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33f255475ce3 Backed out changeset 4934ec1fbb6f for causing xpcshell failures in test_DownloadCore.js
Comment 9•3 years ago
|
||
Backed out changeset 4934ec1fbb6f (Bug 1649611) for causing xpcshell failures in test_DownloadCore.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/33f255475ce3ca90d17d68f282d12b636bceab85
Failure log: https://treeherder.mozilla.org/logviewer?job_id=326892062&repo=autoland&lineNumber=7428
Comment 10•3 years ago
|
||
Pushed by emalysz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c89276392499 Remove OS.File usage from DownloadIntegration.jsm and respect umask in IOUtils::SetPermissions r=barret
Comment 11•3 years ago
|
||
Backed out for causing build bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/b9c2b81877d95f82c7da72b1b54df7f2f35da287
Failure log: https://treeherder.mozilla.org/logviewer?job_id=328022502&repo=autoland&lineNumber=14072
Comment 12•3 years ago
|
||
Pushed by emalysz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7dd9e63300d Remove OS.File usage from DownloadIntegration.jsm and respect umask in IOUtils::SetPermissions r=barret
Comment 13•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Backed out for causing bug 1689404: https://hg.mozilla.org/mozilla-central/rev/3bdf0c33844f1dc4198f0c44f1ff137b966cdc1d
Comment 15•3 years ago
|
||
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/91181a01b68c Remove OS.File usage from DownloadIntegration.jsm and respect umask in IOUtils::SetPermissions r=barret
Comment 16•3 years ago
|
||
Backed out for mochitest failures on test_ioutils_mkdir.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/068f7227221736e268f9ca7c2560bd53d0e47cfc
Log link: https://treeherder.mozilla.org/logviewer?job_id=328265603&repo=autoland&lineNumber=2024
Comment 17•3 years ago
|
||
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aadba76932ea Remove OS.File usage from DownloadIntegration.jsm and respect umask in IOUtils::SetPermissions r=barret
Comment 18•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Comment 19•2 years ago
|
||
Did this cause a regression on Windows, that temporary files opened using "Open With" are not read-only anymore (see bug 1095893, bug 1009465), even though 'browser.helperApps.deleteTempFileOnExit' is true, and are opened read-write (see e.g. https://bugs.documentfoundation.org/show_bug.cgi?id=146642 for LibreOffice)?
Reporter | ||
Comment 20•2 years ago
|
||
This patch did not change how we compute the mode, but the mode changing code from OS.File to IOUtils. There are currently automated test to check that IOUtils.setPermissions works correctly on windows and I opened up a terminal to double check:
>> await IOUtils.writeUTF8("C:\\t\\txt.txt", "")
0
>> await IOUtils.setPermissions("C:\\t\\txt.txt", 0o400)
undefined
>> await IOUtils.getWindowsAttributes("C:\\t\\txt.txt")
Object { hidden: false, readOnly: true, system: false }
>> await IOUtils.stat("C:\\t\\txt.txt")
Object { creationTime: 1641835572456, lastModified: 1641835572456, path: "C:\\t\\txt.txt", permissions: 292, size: 0, type: "regular" }
Perhaps this is due to bug 1726858, which changed the logic for download permissions?
Updated•11 months ago
|
Description
•