Diff
Modified: trunk/Source/WTF/ChangeLog (127305 => 127306)
--- trunk/Source/WTF/ChangeLog 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Source/WTF/ChangeLog 2012-08-31 20:11:26 UTC (rev 127306)
@@ -1,3 +1,17 @@
+2012-08-31 Pratik Solanki <[email protected]>
+
+ objc_msgSend and IMP should be cast appropriately before using
+ https://bugs.webkit.org/show_bug.cgi?id=95242
+
+ Reviewed by Benjamin Poulain.
+
+ Fix for older compilers. Pass id as the return type to the template
+ instead of relying on default type.
+
+ * wtf/Functional.h:
+ (WTF::R):
+ * wtf/ObjcRuntimeExtras.h:
+
2012-08-31 Michael Saboff <[email protected]>
CSS Parser should directly parse 8 bit source strings
Modified: trunk/Source/WTF/wtf/Functional.h (127305 => 127306)
--- trunk/Source/WTF/wtf/Functional.h 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Source/WTF/wtf/Functional.h 2012-08-31 20:11:26 UTC (rev 127306)
@@ -635,8 +635,8 @@
//
// dispatch_async(queue, bind(...));
//
- id copiedBlock = wtfObjcMsgSend((id)block, sel_registerName("copy"));
- id autoreleasedBlock = wtfObjcMsgSend(copiedBlock, sel_registerName("autorelease"));
+ id copiedBlock = wtfObjcMsgSend<id>((id)block, sel_registerName("copy"));
+ id autoreleasedBlock = wtfObjcMsgSend<id>(copiedBlock, sel_registerName("autorelease"));
return (BlockType)autoreleasedBlock;
}
#endif
Modified: trunk/Source/WTF/wtf/ObjcRuntimeExtras.h (127305 => 127306)
--- trunk/Source/WTF/wtf/ObjcRuntimeExtras.h 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Source/WTF/wtf/ObjcRuntimeExtras.h 2012-08-31 20:11:26 UTC (rev 127306)
@@ -25,79 +25,79 @@
#ifndef WTF_ObjcRuntimeExtras_h
#define WTF_ObjcRuntimeExtras_h
-template<typename RetType = id>
+template<typename RetType>
RetType wtfObjcMsgSend(id target, SEL selector)
{
return reinterpret_cast<RetType (*)(id, SEL)>(objc_msgSend)(target, selector);
}
-template<typename RetType = id, typename Arg1Type>
+template<typename RetType, typename Arg1Type>
RetType wtfObjcMsgSend(id target, SEL selector, Arg1Type arg1)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type)>(objc_msgSend)(target, selector, arg1);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type>
RetType wtfObjcMsgSend(id target, SEL selector, Arg1Type arg1, Arg2Type arg2)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type)>(objc_msgSend)(target, selector, arg1, arg2);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type, typename Arg3Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type, typename Arg3Type>
RetType wtfObjcMsgSend(id target, SEL selector, Arg1Type arg1, Arg2Type arg2, Arg3Type arg3)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type, Arg3Type)>(objc_msgSend)(target, selector, arg1, arg2, arg3);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type>
RetType wtfObjcMsgSend(id target, SEL selector, Arg1Type arg1, Arg2Type arg2, Arg3Type arg3, Arg4Type arg4)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type, Arg3Type, Arg4Type)>(objc_msgSend)(target, selector, arg1, arg2, arg3, arg4);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type, typename Arg5Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type, typename Arg5Type>
RetType wtfObjcMsgSend(id target, SEL selector, Arg1Type arg1, Arg2Type arg2, Arg3Type arg3, Arg4Type arg4, Arg5Type arg5)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type, Arg3Type, Arg4Type, Arg5Type)>(objc_msgSend)(target, selector, arg1, arg2, arg3, arg4, arg5);
}
-template<typename RetType = id>
+template<typename RetType>
RetType wtfCallIMP(IMP implementation, id target, SEL selector)
{
return reinterpret_cast<RetType (*)(id, SEL)>(implementation)(target, selector);
}
-template<typename RetType = id, typename Arg1Type>
+template<typename RetType, typename Arg1Type>
RetType wtfCallIMP(IMP implementation, id target, SEL selector, Arg1Type arg1)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type)>(implementation)(target, selector, arg1);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type>
RetType wtfCallIMP(IMP implementation, id target, SEL selector, Arg1Type arg1, Arg2Type arg2)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type)>(implementation)(target, selector, arg1, arg2);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type, typename Arg3Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type, typename Arg3Type>
RetType wtfCallIMP(IMP implementation, id target, SEL selector, Arg1Type arg1, Arg2Type arg2, Arg3Type arg3)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type, Arg3Type)>(implementation)(target, selector, arg1, arg2, arg3);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type>
RetType wtfCallIMP(IMP implementation, id target, SEL selector, Arg1Type arg1, Arg2Type arg2, Arg3Type arg3, Arg4Type arg4)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type, Arg3Type, Arg4Type)>(implementation)(target, selector, arg1, arg2, arg3, arg4);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type, typename Arg5Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type, typename Arg5Type>
RetType wtfCallIMP(IMP implementation, id target, SEL selector, Arg1Type arg1, Arg2Type arg2, Arg3Type arg3, Arg4Type arg4, Arg5Type arg5)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type, Arg3Type, Arg4Type, Arg5Type)>(implementation)(target, selector, arg1, arg2, arg3, arg4, arg5);
}
-template<typename RetType = id, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type, typename Arg5Type, typename Arg6Type>
+template<typename RetType, typename Arg1Type, typename Arg2Type, typename Arg3Type, typename Arg4Type, typename Arg5Type, typename Arg6Type>
RetType wtfCallIMP(IMP implementation, id target, SEL selector, Arg1Type arg1, Arg2Type arg2, Arg3Type arg3, Arg4Type arg4, Arg5Type arg5, Arg6Type arg6)
{
return reinterpret_cast<RetType (*)(id, SEL, Arg1Type, Arg2Type, Arg3Type, Arg4Type, Arg5Type, Arg6Type)>(implementation)(target, selector, arg1, arg2, arg3, arg4, arg5, arg6);
Modified: trunk/Source/WebKit/mac/ChangeLog (127305 => 127306)
--- trunk/Source/WebKit/mac/ChangeLog 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-08-31 20:11:26 UTC (rev 127306)
@@ -1,3 +1,20 @@
+2012-08-31 Pratik Solanki <[email protected]>
+
+ objc_msgSend and IMP should be cast appropriately before using
+ https://bugs.webkit.org/show_bug.cgi?id=95242
+
+ Reviewed by Benjamin Poulain.
+
+ Fix for older compilers. Pass id as the return type to the template
+ instead of relying on default type.
+
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallDelegate):
+ (CallFormDelegate):
+ * WebView/WebHTMLView.mm:
+ (setCursor):
+ (setNeedsDisplayInRect):
+
2012-08-30 Geoffrey Garen <[email protected]>
Use one object instead of two for closures, eliminating ScopeChainNode
Modified: trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm (127305 => 127306)
--- trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm 2012-08-31 20:11:26 UTC (rev 127306)
@@ -85,7 +85,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, self);
+ return wtfObjcMsgSend<id>(delegate, selector, self);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -97,7 +97,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, self, object);
+ return wtfObjcMsgSend<id>(delegate, selector, self, object);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -109,7 +109,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, self, rect);
+ return wtfObjcMsgSend<id>(delegate, selector, self, rect);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -121,7 +121,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, self, object1, object2);
+ return wtfObjcMsgSend<id>(delegate, selector, self, object1, object2);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -133,7 +133,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, self, object, boolean);
+ return wtfObjcMsgSend<id>(delegate, selector, self, object, boolean);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -145,7 +145,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, self, object1, object2, object3);
+ return wtfObjcMsgSend<id>(delegate, selector, self, object1, object2, object3);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -157,7 +157,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, self, object, integer);
+ return wtfObjcMsgSend<id>(delegate, selector, self, object, integer);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -241,7 +241,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self);
+ return wtfCallIMP<id>(implementation, delegate, selector, self);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -253,7 +253,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -265,7 +265,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, object2);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, object2);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -277,7 +277,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, object2, object3);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, object2, object3);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -289,7 +289,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, object2, object3, object4);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, object2, object3, object4);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -301,7 +301,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, integer, object2);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, integer, object2);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -313,7 +313,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, integer1, integer2, object2);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, integer1, integer2, object2);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -325,7 +325,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, boolean, integer1, integer2, object2);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, boolean, integer1, integer2, object2);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -337,7 +337,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, object2, integer, object3);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, object2, integer, object3);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -349,7 +349,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, integer1, object2, integer2, object3);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, integer1, object2, integer2, object3);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -361,7 +361,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, integer, object2, object3, object4);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, integer, object2, object3, object4);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -373,7 +373,7 @@
if (!delegate)
return nil;
@try {
- return wtfCallIMP(implementation, delegate, selector, self, object1, interval, object2, object3);
+ return wtfCallIMP<id>(implementation, delegate, selector, self, object1, interval, object2, object3);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -578,7 +578,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, object1, object2);
+ return wtfObjcMsgSend<id>(delegate, selector, object1, object2);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
@@ -591,7 +591,7 @@
if (!delegate || ![delegate respondsToSelector:selector])
return nil;
@try {
- return wtfObjcMsgSend(delegate, selector, object1, object2, object3, object4, object5);
+ return wtfObjcMsgSend<id>(delegate, selector, object1, object2, object3, object4, object5);
} @catch(id exception) {
ReportDiscardedDelegateException(selector, exception);
}
Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (127305 => 127306)
--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2012-08-31 20:11:26 UTC (rev 127306)
@@ -264,7 +264,7 @@
static void setCursor(NSWindow *self, SEL cmd, NSPoint point)
{
if (needsCursorRectsSupportAtPoint(self, point))
- wtfCallIMP(oldSetCursorForMouseLocationIMP, self, cmd, point);
+ wtfCallIMP<id>(oldSetCursorForMouseLocationIMP, self, cmd, point);
}
@@ -298,7 +298,7 @@
static void setNeedsDisplayInRect(NSView *self, SEL cmd, NSRect invalidRect)
{
if (![self _drawnByAncestor]) {
- wtfCallIMP(oldSetNeedsDisplayInRectIMP, self, cmd, invalidRect);
+ wtfCallIMP<id>(oldSetNeedsDisplayInRectIMP, self, cmd, invalidRect);
return;
}
@@ -308,14 +308,14 @@
enclosingWebFrameView = (WebFrameView *)[enclosingWebFrameView superview];
if (!enclosingWebFrameView) {
- wtfCallIMP(oldSetNeedsDisplayInRectIMP, self, cmd, invalidRect);
+ wtfCallIMP<id>(oldSetNeedsDisplayInRectIMP, self, cmd, invalidRect);
return;
}
Frame* coreFrame = core([enclosingWebFrameView webFrame]);
FrameView* frameView = coreFrame ? coreFrame->view() : 0;
if (!frameView || !frameView->isEnclosedInCompositingLayer()) {
- wtfCallIMP(oldSetNeedsDisplayInRectIMP, self, cmd, invalidRect);
+ wtfCallIMP<id>(oldSetNeedsDisplayInRectIMP, self, cmd, invalidRect);
return;
}
Modified: trunk/Tools/ChangeLog (127305 => 127306)
--- trunk/Tools/ChangeLog 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Tools/ChangeLog 2012-08-31 20:11:26 UTC (rev 127306)
@@ -1,3 +1,18 @@
+2012-08-31 Pratik Solanki <[email protected]>
+
+ objc_msgSend and IMP should be cast appropriately before using
+ https://bugs.webkit.org/show_bug.cgi?id=95242
+
+ Reviewed by Benjamin Poulain.
+
+ Fix for older compilers. Pass id as the return type to the template
+ instead of relying on default type.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (drt_NSFontManager_availableFontFamilies):
+ * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
+ (WTR::wtr_NSFontManager_availableFontFamilies):
+
2012-08-31 Zan Dobersek <[email protected]>
nrwt: use scm instead of calling svn directly to get the revision in json results generator
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (127305 => 127306)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2012-08-31 20:11:26 UTC (rev 127306)
@@ -355,7 +355,7 @@
if (availableFontFamilies)
return availableFontFamilies;
- NSArray *availableFamilies = wtfCallIMP(appKitAvailableFontFamiliesIMP, self, _cmd);
+ NSArray *availableFamilies = wtfCallIMP<id>(appKitAvailableFontFamiliesIMP, self, _cmd);
NSMutableSet *prunedFamiliesSet = [NSMutableSet setWithArray:availableFamilies];
[prunedFamiliesSet intersectSet:allowedFontFamilySet()];
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm (127305 => 127306)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm 2012-08-31 20:10:29 UTC (rev 127305)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm 2012-08-31 20:11:26 UTC (rev 127306)
@@ -171,7 +171,7 @@
if (availableFontFamilies)
return availableFontFamilies;
- NSArray *availableFamilies = wtfCallIMP(appKitAvailableFontFamiliesIMP, self, _cmd);
+ NSArray *availableFamilies = wtfCallIMP<id>(appKitAvailableFontFamiliesIMP, self, _cmd);
NSMutableSet *prunedFamiliesSet = [NSMutableSet setWithArray:availableFamilies];
[prunedFamiliesSet intersectSet:allowedFontFamilySet()];