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

RESOLVED FIXED in Thunderbird 48.0

Status

MailNews Core
Backend
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: ISHIKAWA, Chiaki, Unassigned)

Tracking

({regression})

Trunk
Thunderbird 48.0
regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

a year ago
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
(Reporter)

Updated

a year ago
See Also: → bug 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?

Comment 4

a year ago
Created attachment 8734533 [details] [diff] [review]
This might work.

Comment 5

a year ago
(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)

?

Updated

a year ago
Blocks: 1257128
Keywords: regression

Comment 7

a year ago
Created attachment 8734538 [details] [diff] [review]
This might work, take 2.

Oops, sorry.

Updated

a year ago
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.

Updated

a year ago
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'

Updated

a year ago
Attachment #8734538 - Flags: feedback?(n.nethercote)

Updated

a year ago
Attachment #8734538 - Flags: review?(rkent)

Comment 9

a year ago
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+

Comment 11

a year ago
https://hg.mozilla.org/comm-central/rev/ed69d0332588
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 48.0

Updated

a year ago
Attachment #8734538 - Flags: feedback?(n.nethercote)
You need to log in before you can comment on or make changes to this bug.