Closed Bug 1741619 Opened 3 years ago Closed 3 years ago

Change URI APIs from raw string to smart string

Categories

(MailNews Core :: General, task)

Tracking

(thunderbird_esr91 fixed, thunderbird95 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
thunderbird_esr91 --- fixed
thunderbird95 --- fixed

People

(Reporter: rachel, Assigned: rachel)

References

Details

Attachments

(1 file, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #1741559 +++

+++ This bug was initially created as a clone of Bug #1739784 +++

Change URI APIs to from raw string to smart string. Patch in progress.

Attached patch 1741559-string-APIs.patch (obsolete) — Splinter Review

This patch shows that if you touch it, it easily spins out of control. There are some APIs left which pass the URI as a string, most notably GetMsgDBHdrFromURI() which can't be changed without further ripple effects to nsMsgDBFolder::OnMessageClassified(). There is also quite a bit of ugliness around nsMsgCompose::CreateMessage().

Please do a try run with the patch.

Attachment #9251183 - Flags: review?(mkmelin+mozilla)
Attached patch 1741559-string-APIs.patch (obsolete) — Splinter Review

Sorry, one tweak more.

Attachment #9251183 - Attachment is obsolete: true
Attachment #9251183 - Flags: review?(mkmelin+mozilla)
Attachment #9251190 - Flags: review?(mkmelin+mozilla)
Depends on: 1741559

This overlaps with the list on bug 1739814, so adding a blocking dependency.

Blocks: 1739814

Sorry, wrong bug number.

Attachment #9251190 - Attachment is obsolete: true
Attachment #9251190 - Flags: review?(mkmelin+mozilla)
Attachment #9251327 - Flags: review?(mkmelin+mozilla)
Assignee: nobody → rachel
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 96 Branch
Comment on attachment 9251327 [details] [diff] [review]
1741619-string-APIs.patch

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

Try looks good.
Attachment #9251327 - Flags: review?(mkmelin+mozilla) → review+

Thanks. We shipped it in our fork to fix bug 1739814 comment #3. Feel free to review the patch over there, too. It needs clang-formatting (which sadly can't be done on mailnews/ as a whole since it will modify other files). Also please note the ESR versions here and in the other bug.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/eba00963c6a0
Change most URI APIs to from raw string to smart string. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Summary: Change URI APIs to from raw string to smart string → Change URI APIs from raw string to smart string

Comment on attachment 9251327 [details] [diff] [review]
1741619-string-APIs.patch

[Approval Request Comment]
Regression caused by (bug #): bug 1571672
User impact if declined: Various things don't work on folders with non-ASCII names: Saves multiple drafts, virtual folders don't work, etc.
Testing completed (on c-c, etc.): Yes.
Risk to taking this patch (and alternatives if risky):
Not risky, mostly mechanical change of raw string API to "smart" string API allowing for non-ASCII strings to be correctly passed around.
Part of a pack of four bugs which need to be uplifted in this order:
Bug 1741559, bug 1741619, bug 1739814, bug 1739903. Bug 1739784 was the first one in the series and that's already on ESR.

Attachment #9251327 - Flags: approval-comm-esr91?
Attachment #9251327 - Flags: approval-comm-beta?

Comment on attachment 9251327 [details] [diff] [review]
1741619-string-APIs.patch

[Triage Comment]
Approved for beta

Attachment #9251327 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9251327 [details] [diff] [review]
1741619-string-APIs.patch

[Triage Comment]
Approved for esr91

Attachment #9251327 - Flags: approval-comm-esr91? → approval-comm-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: