C-C TB: nsMessagenerUnixIntegration.cpp compilation error: # of argument is not correct to nsIAlertsService::ShowAlertNotification

RESOLVED DUPLICATE of bug 1106346

Status

RESOLVED DUPLICATE of bug 1106346
4 years ago
4 years ago

People

(Reporter: ishikawa, Unassigned)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
After refreshing the source file from Comm-central a couple of hours
ago, and trying to compile TB on local PC, I got the following error.

/REF-COMM-CENTRAL/comm-central/mailnews/base/src/nsMessengerUnixIntegration.cpp: In member function ‘nsresult nsMessengerUnixIntegration::ShowAlertMessage(const nsAString_internal&, const nsAString_internal&, const nsACString_internal&)’:
/REF-COMM-CENTRAL/comm-central/mailnews/base/src/nsMessengerUnixIntegration.cpp:338:54: error: no matching function for call to ‘nsIAlertsService::ShowAlertNotification(const nsLiteralString&, const nsAString_internal&, const nsAString_internal&, bool, NS_ConvertASCIItoUTF16, nsMessengerUnixIntegration*, const nsAFlatString&, const nsLiteralString&, const nsAFlatString&, const nsAFlatString&, std::nullptr_t)’
                                               nullptr);
                                                      ^
/REF-COMM-CENTRAL/comm-central/mailnews/base/src/nsMessengerUnixIntegration.cpp:338:54: note: candidate is:
In file included from /REF-COMM-CENTRAL/comm-central/mailnews/base/src/nsMessengerUnixIntegration.cpp:31:0:
../../../dist/include/nsIAlertsService.h:37:20: note: virtual nsresult nsIAlertsService::ShowAlertNotification(const nsAString_internal&, const nsAString_internal&, const nsAString_internal&, bool, const nsAString_internal&, nsIObserver*, const nsAString_internal&, const nsAString_internal&, const nsAString_internal&, const nsAString_internal&, nsIPrincipal*, bool)
   NS_IMETHOD ShowAlertNotification(const nsAString & imageUrl, const nsAString & title, const nsAString & text, bool textClickable, const nsAString & cookie, nsIObserver *alertListener, const nsAString & name, const nsAString & dir, const nsAString & lang, const nsAString & data, nsIPrincipal *principal, bool inPrivateBrowsing) = 0;
                    ^
../../../dist/include/nsIAlertsService.h:37:20: note:   candidate expects 12 arguments, 11 provided


Culprit is a recent change to add |nsIprincipal| to the parameter list of
|ShowALertNotification|.

http://hg.mozilla.org/mozilla-central/rev/8ce724c02b7c

I see the change to add |nsIPrincipal| there.
http://hg.mozilla.org/mozilla-central/rev/8ce724c02b7c#l7.22

CloseAlert() also has a new second argument.

FYI

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Keywords: regression
Resolution: --- → DUPLICATE
Duplicate of bug: 1106346
You need to log in before you can comment on or make changes to this bug.