Closed Bug 1677168 Opened 1 year ago Closed 1 year ago

nsFilePicker cleanup

Categories

(Core :: Widget: Win32, task)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There is a bunch of stuff in nsFilePicker that is either crufty, redundant, or didn't work right. I'd like to land this work as a prereq to moving file pickers out of process.

  • We replace mLastUsedUnicodeDirectory and its manual memory managemnt with a
    UniquePtr named sLastUsedUnicodeDirectory
  • We remove AutoRestoreWorkingPath, as it never was actually necessary and
    was left in, "just in case."
  • We remove the timeout stuff, as that never actually worked, at least with
    the current implementation of the file picker; perhaps it worked with the
    legacy file picker APIs, but it doesn't work with the Vista+, COM-based stuff.
  • We also get rid of IFileDialogEvents, as all of that stuff was needed for
    timeouts. It also adds additional complexity that impairs our ability to
    implement out-of-process file pickers in a future bug.
  • We replace do_CreateInstance("@mozilla.org/file/local;1") with
    NS_NewLocalFile.
  • We add HRESULT error handling to all of the method invocations on COM
    interfaces.
  • We replace CLSCTX_INPROC with CLSCTX_INPROC_SERVER in CoCreateInstance
    calls.
  • We remove CoInitialize and CoUninitialize calls. Those have been
    unnecessary ever since we added mscom::ProcessRuntime instantiation during
    startup.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.