Closed Bug 1259495 Opened 9 years ago Closed 9 years ago

mailnews/local/src/nsLocalUndoTxn.cpp:553:15: error: ‘class nsIAtom’ has no member named ‘EqualsUTF8'

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 48.0

People

(Reporter: ishikawa, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

It is great to see C-C build working again, but when I refreshed the source a few hours ago, I got a compilation bug. mailnews/local/src/nsLocalUndoTxn.cpp:553:15: error: ‘class nsIAtom’ has no member named ‘EqualsUTF8’ aEvent->EqualsUTF8(NS_LITERAL_CSTRING("FolderLoaded"))) ^ Probably a method was decprecated or something.
I suppose, it's bug 1257128.
Component: Message Reader UI → Backend
Product: Thunderbird → MailNews Core
See Also: → 1257128
Sorry for the breakage! I think you can fix it by (a) changing the NS_LITERAL_CSTRING to NS_LITERAL_STRING, and (b) calling ScriptableEquals() instead of EqualsUTF8().
This: aEvent->ScriptableEquals(NS_LITERAL_STRING("FolderLoaded"))) ends in this error: z:/Mozilla/comm-central/mailnews/local/src/nsLocalUndoTxn.cpp(553) : error C2660: 'nsIAtom::ScriptableEquals' : function does not take 1 arguments I have zero knowledge of c++ As I understand, EqualsUTF8 was this AtomImpl::EqualsUTF8(const nsACString& aString) { return CompareUTF8toUTF16(aString, nsDependentString(mString, mLength)) == 0; } Would it work, using CompareUTF8toUTF16 somehow?
Attached patch This might work. (obsolete) — Splinter Review
(In reply to Jorg K (GMT+1) from comment #4) > Created attachment 8734533 [details] [diff] [review] > This might work. SM: /home/hafi/moz-work/src/mailnews/local/src/nsLocalUndoTxn.cpp:554:32: error: ‘NS_LITERAL_STRING’ was not declared in this scope aEvent->ScriptableEquals(NS_LITERAL_STRING("FolderLoaded", &isEqual)); ^ (deps) /home/hafi/moz-work/src/mozilla/intl/icu/source/i18n/collationcompare.cpp /home/hafi/moz-work/src/mozilla/config/rules.mk:918: recipe for target 'nsLocalUndoTxn.o' failed make[4]: *** [nsLocalUndoTxn.o] Error 1
Are just the braces wrong and it should be: aEvent->ScriptableEquals(NS_LITERAL_STRING("FolderLoaded"), &isEqual) ?
Blocks: 1257128
Keywords: regression
Oops, sorry.
Attachment #8734533 - Attachment is obsolete: true
Suite seems to compile but now hits a VS2015 char16_t error. Unrelated to this one. Someone goofed in mozilla code so can't test right now.
Summary: C-C TB compilation failure: mailnews/local/src/nsLocalUndoTxn.cpp:553:15: error: ‘class nsIAtom’ has no member named ‘EqualsUTF8’ aEvent->EqualsUTF8(NS_LITERAL_CSTRING("FolderLoaded"))) ^ → mailnews/local/src/nsLocalUndoTxn.cpp:553:15: error: ‘class nsIAtom’ has no member named ‘EqualsUTF8'
Attachment #8734538 - Flags: feedback?(n.nethercote)
Attachment #8734538 - Flags: review?(rkent)
My SM-Trunk Linux x86_64 builds successfully now. Because $OBJDIR is always deleted before compiling?
Comment on attachment 8734538 [details] [diff] [review] This might work, take 2. Review of attachment 8734538 [details] [diff] [review]: ----------------------------------------------------------------- OK LGTM.
Attachment #8734538 - Flags: review?(rkent) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 48.0
Attachment #8734538 - Flags: feedback?(n.nethercote)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: