[FIX]"Save Page As" doesn't give the filename of the bugzilla attachment

RESOLVED FIXED

Status

()

Firefox
File Handling
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: smaug, Assigned: bz)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

When using Save Page As with bugzilla attachments, the default filename is attachment.cgi, not the real file name.
This is totally my fault.  Gotta love try/catch.
Assignee: nobody → bzbarsky
Blocks: 84106
Summary: "Save Page As" doesn't give the filename of the bugzilla attachment → [FIX]"Save Page As" doesn't give the filename of the bugzilla attachment
Created attachment 364318 [details] [diff] [review]
I wish we had tests for this
Attachment #364318 - Flags: review?(gavin.sharp)
Attachment #364318 - Flags: review?(gavin.sharp) → review+
Comment on attachment 364318 [details] [diff] [review]
I wish we had tests for this

:(
Is there actually more than one expected error, so the catch block can't just check for that and rethrow any other errors?
Dunno.  Looking at nsDOMWindowUtils::GetDocumentMetadata I wouldn't expect this code to ever get an exception to start with, so I have no idea why someone stuck a try/catch here.
Looks to me like we'll have to ask you either way: bug 263697 first, then bug 264757.
Ah, that first checkin had the try/catch because the "get to window utils" part could throw.
Pushed http://hg.mozilla.org/mozilla-central/rev/707ad9ee494a
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.