Fix the Mac build with a newer compiler
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Mar 2015 19:36:28 +0000 (19:36 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Mar 2015 19:36:28 +0000 (19:36 +0000)
* Plugins/WebPluginController.mm:
(WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_):
(WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181335 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/WebPluginController.mm

index 6ddcae9..83598de 100644 (file)
@@ -1,3 +1,11 @@
+2015-03-10  Tim Horton  <timothy_horton@apple.com>
+
+        Fix the Mac build with a newer compiler
+
+        * Plugins/WebPluginController.mm:
+        (WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_):
+        (WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_):
+
 2015-03-09  David Kilzer  <ddkilzer@apple.com>
 
         [iOS] Fix build when compiling with dead code stripping disabled
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);
 }