Closed Bug 1398039 Opened 7 years ago Closed 7 years ago

Port |Bug 1393230 - Part 1/2: Remove remaining string forward declarations & fix improper use| to mailnews/

Categories

(Thunderbird :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

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

Details

Attachments

(1 file, 1 obsolete file)

Simple fix, you'll see it in a minute.
Attached patch 1398039-string-forwards.patch (obsolete) — Splinter Review
This should do it.
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/9e30863be03a
Port bug 1393230: Remove string forward declarations and fix improper string usage in Find(). rs=bustage-fix
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Fixing a second problem which led to a link error.
Assignee: nobody → jorgk
Attachment #8905803 - Attachment is obsolete: true
Summary: Port |Bug 1393230 - Part 1: Remove remaining string forward declarations| to mailnews/ → Port |Bug 1393230 - Part 1/2: Remove remaining string forward declarations & fix improper use| to mailnews/
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/def874d2d27c
Follow-up: Use CaseInsensitiveCompare (nsMsgUtils.h) for consistency. rs=bustage-fix DONTBUILD
Comment on attachment 8905853 [details] [diff] [review]
1398039-string-forwards.patch (v2)

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

::: mailnews/imap/src/nsImapProtocol.cpp
@@ +7761,5 @@
>    // This is a workaround for an issue with LIST(SUBSCRIBED) crashing older versions of Zimbra
>    if (GetServerStateParser().GetServerID().Find("\"NAME\" \"Zimbra\"", CaseInsensitiveCompare) != kNotFound) {
>      nsCString serverID(GetServerStateParser().GetServerID());
>      int start = serverID.Find("\"VERSION\" \"", CaseInsensitiveCompare) + 11;
> +    int length = serverID.Find("\" ", /* aIgnoreCase = */ true, start);

This is interesting. Does it fix a bug of wrong arguments, that went undetected by the compiler till now?
Attachment #8905853 - Flags: review+
Honestly, I have no idea. It seems that way. Maybe there aren't so many Zimbra servers any more. M-C had cases like this as well:
https://hg.mozilla.org/mozilla-central/rev/a1bcb487ffec#l3.12
https://hg.mozilla.org/mozilla-central/rev/a1bcb487ffec#l4.12
Or maybe the previous implementation dealt better with that case. It's all C++ trickery.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: