Title: [102953] trunk/Source
Revision
102953
Author
[email protected]
Date
2011-12-15 10:05:19 -0800 (Thu, 15 Dec 2011)

Log Message

Add WTF::Function to wtf/Forward.h
https://bugs.webkit.org/show_bug.cgi?id=74576

Reviewed by Adam Roben.

Source/_javascript_Core:

* jsc.cpp:
Work around a name conflict in the readline library.

* wtf/Forward.h:
Add Function.

Source/WebCore:

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
Add a JSC:: qualifier to the Function flags to avoid ambiguities.

Source/WebKit2:

* Platform/RunLoop.h:
* Platform/WorkQueue.h:
Remove forward declarations and just include wtf/Forward.h.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (102952 => 102953)


--- trunk/Source/_javascript_Core/ChangeLog	2011-12-15 17:55:47 UTC (rev 102952)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-12-15 18:05:19 UTC (rev 102953)
@@ -1,3 +1,16 @@
+2011-12-14  Anders Carlsson  <[email protected]>
+
+        Add WTF::Function to wtf/Forward.h
+        https://bugs.webkit.org/show_bug.cgi?id=74576
+
+        Reviewed by Adam Roben.
+
+        * jsc.cpp:
+        Work around a name conflict in the readline library.
+
+        * wtf/Forward.h:
+        Add Function.
+
 2011-12-15  Igor Oliveira  <[email protected]>
 
         [Qt] Support requestAnimationFrame API

Modified: trunk/Source/_javascript_Core/jsc.cpp (102952 => 102953)


--- trunk/Source/_javascript_Core/jsc.cpp	2011-12-15 17:55:47 UTC (rev 102952)
+++ trunk/Source/_javascript_Core/jsc.cpp	2011-12-15 18:05:19 UTC (rev 102953)
@@ -43,8 +43,12 @@
 #endif
 
 #if HAVE(READLINE)
+// readline/history.h has a Function typedef which conflicts with the WTF::Function template from WTF/Forward.h
+// We #define it to something else to avoid this conflict.
+#define Function ReadlineFunction
 #include <readline/history.h>
 #include <readline/readline.h>
+#undef Function
 #endif
 
 #if HAVE(SYS_TIME_H)

Modified: trunk/Source/_javascript_Core/wtf/Forward.h (102952 => 102953)


--- trunk/Source/_javascript_Core/wtf/Forward.h	2011-12-15 17:55:47 UTC (rev 102952)
+++ trunk/Source/_javascript_Core/wtf/Forward.h	2011-12-15 18:05:19 UTC (rev 102953)
@@ -24,6 +24,7 @@
 #include <stddef.h>
 
 namespace WTF {
+    template<typename T> class Function;
     template<typename T> class ListRefPtr;
     template<typename T> class OwnArrayPtr;
     template<typename T> class OwnPtr;
@@ -54,6 +55,7 @@
     class Uint32Array;
 }
 
+using WTF::Function;
 using WTF::ListRefPtr;
 using WTF::OwnArrayPtr;
 using WTF::OwnPtr;

Modified: trunk/Source/WebCore/ChangeLog (102952 => 102953)


--- trunk/Source/WebCore/ChangeLog	2011-12-15 17:55:47 UTC (rev 102952)
+++ trunk/Source/WebCore/ChangeLog	2011-12-15 18:05:19 UTC (rev 102953)
@@ -1,3 +1,14 @@
+2011-12-14  Anders Carlsson  <[email protected]>
+
+        Add WTF::Function to wtf/Forward.h
+        https://bugs.webkit.org/show_bug.cgi?id=74576
+
+        Reviewed by Adam Roben.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        Add a JSC:: qualifier to the Function flags to avoid ambiguities.
+
 2011-12-15  Julien Chaffraix  <[email protected]>
 
         Hardware-backed renderLayer could avoid repainting during a positioned movement layout

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (102952 => 102953)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2011-12-15 17:55:47 UTC (rev 102952)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2011-12-15 18:05:19 UTC (rev 102953)
@@ -1417,7 +1417,7 @@
             my @specials = ();
             push(@specials, "DontDelete") unless $function->signature->extendedAttributes->{"Deletable"};
             push(@specials, "DontEnum") if $function->signature->extendedAttributes->{"DontEnum"};
-            push(@specials, "Function");
+            push(@specials, "JSC::Function");
             my $special = (@specials > 0) ? join(" | ", @specials) : "0";
             push(@hashSpecials, $special);
 
@@ -1481,7 +1481,7 @@
         my @specials = ();
         push(@specials, "DontDelete") unless $function->signature->extendedAttributes->{"Deletable"};
         push(@specials, "DontEnum") if $function->signature->extendedAttributes->{"DontEnum"};
-        push(@specials, "Function");
+        push(@specials, "JSC::Function");
         my $special = (@specials > 0) ? join(" | ", @specials) : "0";
         push(@hashSpecials, $special);
 

Modified: trunk/Source/WebKit2/ChangeLog (102952 => 102953)


--- trunk/Source/WebKit2/ChangeLog	2011-12-15 17:55:47 UTC (rev 102952)
+++ trunk/Source/WebKit2/ChangeLog	2011-12-15 18:05:19 UTC (rev 102953)
@@ -1,3 +1,14 @@
+2011-12-14  Anders Carlsson  <[email protected]>
+
+        Add WTF::Function to wtf/Forward.h
+        https://bugs.webkit.org/show_bug.cgi?id=74576
+
+        Reviewed by Adam Roben.
+
+        * Platform/RunLoop.h:
+        * Platform/WorkQueue.h:
+        Remove forward declarations and just include wtf/Forward.h.
+
 2011-12-15  Rafael Brandao  <[email protected]>
 
         [Qt][WK2] Move WebPreferences into experimental

Modified: trunk/Source/WebKit2/Platform/RunLoop.h (102952 => 102953)


--- trunk/Source/WebKit2/Platform/RunLoop.h	2011-12-15 17:55:47 UTC (rev 102952)
+++ trunk/Source/WebKit2/Platform/RunLoop.h	2011-12-15 18:05:19 UTC (rev 102953)
@@ -28,6 +28,7 @@
 #ifndef RunLoop_h
 #define RunLoop_h
 
+#include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/ThreadSpecific.h>
@@ -47,11 +48,6 @@
 class BinarySemaphore;
 }
 
-namespace WTF {
-    template<typename> class Function;
-}
-using WTF::Function;
-
 class RunLoop {
 public:
     // Must be called from the main thread.

Modified: trunk/Source/WebKit2/Platform/WorkQueue.h (102952 => 102953)


--- trunk/Source/WebKit2/Platform/WorkQueue.h	2011-12-15 17:55:47 UTC (rev 102952)
+++ trunk/Source/WebKit2/Platform/WorkQueue.h	2011-12-15 18:05:19 UTC (rev 102953)
@@ -34,6 +34,7 @@
 #endif
 
 #include "WorkItem.h"
+#include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefCounted.h>
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to