Closed Bug 1564298 Opened 1 year ago Closed 1 year ago

warning: conflicting parameter types in implementation of 'application:continueUserActivity:restorationHandler:' with OS X 10.14 SDK


(Core :: Widget: Cocoa, defect)

Not set



Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed


(Reporter: mccr8, Assigned: spohl)


(Blocks 1 open bug, Regression)


(Keywords: regression)


(1 file)

I think this is another new warning from bug 1560044 (showing up as an error in my build):

0:13.29 In file included from /Users/amccreight/mc/obj-dbg.noindex/toolkit/xre/
0:13.29 /Users/amccreight/mc/toolkit/xre/ error: conflicting parameter types in implementation of 'application:continueUserActivity:restorationHandler:': 'void (^ _Nonnull)(NSArray<id<NSUserActivityRestoring>> * _Nonnull)' vs 'void (^ _Nonnull)(NSArray )' [-Werror,-Wmismatched-parameter-types]
0:13.29 restorationHandler:(void (^)(NSArray
))restorationHandler {
0:13.29 ~~~~~~~~~~~~~~~~~~ ^
0:13.29 /Applications/ note: previous definition is here
0:13.29 - (BOOL)application:(NSApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray<id<NSUserActivityRestoring>> *restorableObjects))restorationHandler NS_AVAILABLE_MAC(10_10);
0:13.29 ~~~~~~ ^
0:13.29 1 error generated.

I confirmed that this happens with the changeset bug 1560044 landed in, but I haven't confirmed this is actually the regressor. But it seems plausible.

(As with the other bug, this is with OS X 10.13.6.)

The real regressor is likely bug 1085391, and the problem is --enable-warnings-as-errors combined with 10.14 SDK. The OS you build this on is not involved.

Regressed by: 1085391
No longer regressed by: 1560044
Summary: warning: conflicting parameter types in implementation of 'application:continueUserActivity:restorationHandler:' → warning: conflicting parameter types in implementation of 'application:continueUserActivity:restorationHandler:' with OS X 10.14 SDK
Blocks: buildwarning

The following fixes it:

--- a/toolkit/xre/
+++ b/toolkit/xre/
@@ -340,17 +340,17 @@ void ProcessPendingGetURLAppleEvents() {
 - (BOOL)application:(NSApplication*)application
     willContinueUserActivityWithType:(NSString*)userActivityType {
   return [userActivityType isEqualToString:NSUserActivityTypeBrowsingWeb];
 - (BOOL)application:(NSApplication*)application
-      restorationHandler:(void (^)(NSArray*))restorationHandler {
+      restorationHandler:(void (^)(NSArray<id<NSUserActivityRestoring>>*))restorationHandler {
   if (![userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
     return NO;
   return [self openURL:userActivity.webpageURL];
 - (void)application:(NSApplication*)application

... but breaks building with older SDKs.

I'm working on a fix along these lines that will still allow for building with older SDKs, but have been slowed down by various build issues on 10.15. Should have a patch shortly.

Pushed by
Make it possible to build with macOS 10.14 SDK. r=mstange
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → spohl.mozilla.bugs

I'm thinking this is probably something we'll want to backport to make developers' lives easier?

Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(spohl.mozilla.bugs)
You need to log in before you can comment on or make changes to this bug.