Closed Bug 1325713 Opened 7 years ago Closed 7 years ago

Remove unnecessary query of nsIURI to nsIURL when opening attachment

Categories

(Thunderbird :: Message Compose Window, defect)

52 Branch
defect
Not set
normal

Tracking

(thunderbird52 fixed, thunderbird53 fixed)

RESOLVED FIXED
Thunderbird 53.0
Tracking Status
thunderbird52 --- fixed
thunderbird53 --- fixed

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

References

Details

Attachments

(1 file, 1 obsolete file)

Remove redundant query of nsURI to nsURI. Patch coming.
Oops, that wasn't quite right, this describes it better:
Remove unnecessary query of nsIURI to nsIURL when opening attachment.

The problem came up when using add-on "Shrunked Image Resizer" with attaches attached images as data URIs now. Such a URI cannot be opened since it can't be QI'ed to an nsURL.
Summary: Remove redundant query of nsURI to nsURI → Remove unnecessary query of nsIURI to nsIURL when opening attachment
Attachment #8821679 - Flags: review?(acelists)
Blocks: 1322155
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Comment on attachment 8821679 [details] [diff] [review]
1325713-remove-QI-url.patch (v1).

Review of attachment 8821679 [details] [diff] [review]:
-----------------------------------------------------------------

This seems like the correct thing to do, newChannelFromURI2 takes an nsIURI.

What about the other nsIURL occurence in loadBlockedImage() ?
Comment on attachment 8821679 [details] [diff] [review]
1325713-remove-QI-url.patch (v1).

Aceman, thanks for the quick action here.

This is Magnus's new code, so let's ask him.

Magnus, why do you query this so an nsIRUL here:
https://dxr.mozilla.org/comm-central/rev/b5cbf4a5f294c84cee905a0e22c32ea34cc66359/mail/components/compose/content/MsgComposeCommands.js#5666
Should we just lose the
  url = url.QueryInterface(Components.interfaces.nsIURL); ?
Flags: needinfo?(mkmelin+mozilla)
If it works without, you can lose it. I probably copied the pattern from somewhere...
Flags: needinfo?(mkmelin+mozilla)
OK, removed another unnecessary QI call. It still works ;-)
Attachment #8821679 - Attachment is obsolete: true
Attachment #8821679 - Flags: review?(acelists)
Attachment #8822199 - Flags: review?(acelists)
Comment on attachment 8822199 [details] [diff] [review]
1325713-remove-QI-url.patch (v2).

Review of attachment 8822199 [details] [diff] [review]:
-----------------------------------------------------------------

Ok.
Attachment #8822199 - Flags: review?(acelists) → review+
Comment on attachment 8822199 [details] [diff] [review]
1325713-remove-QI-url.patch (v2).

This needs to go to Aurora since the original patch landed on TB 52.
Attachment #8822199 - Flags: approval-comm-aurora+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/bcbc94d7ff6c354fcadfa2717a66afdd5e17cdd8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 53.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: