Fix the Mac build with a newer compiler
[WebKit-https.git] / Source / WebKit / mac / Plugins / WebPluginController.mm
index a149ff2..8db02f7 100644 (file)
@@ -667,9 +667,11 @@ static beginSheetModalForWindowIMP original_NSAlert_beginSheetModalForWindow_mod
 typedef void (*alertDidEndIMP)(id, SEL, NSAlert *, NSInteger, void*);
 static alertDidEndIMP original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_;
 
+@class TSUpdateCheck;
+
 static void WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(id object, SEL selector, NSAlert *alert, NSInteger returnCode, void* contextInfo)
 {
-    [[object delegate] autorelease];
+    [[(TSUpdateCheck *)object delegate] autorelease];
 
     original_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(object, selector, alert, returnCode, contextInfo);
 }
@@ -677,7 +679,7 @@ static void WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_(id object,
 static void WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(id object, SEL selector, NSWindow *window, id modalDelegate, SEL didEndSelector, void* contextInfo)
 {
     if (isKindOfClass(modalDelegate, @"TSUpdateCheck"))
-        [[modalDelegate delegate] retain];
+        [[(TSUpdateCheck *)modalDelegate delegate] retain];
 
     original_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_(object, selector, window, modalDelegate, didEndSelector, contextInfo);
 }