[Gtk][DOM Bindings] Conditional string in implementation file generated in wrong...
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 16:27:22 +0000 (16:27 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 16:27:22 +0000 (16:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=85065

Reviewed by Martin Robinson.

Put the condition string in implementation file after the header inclusions. This ensures
that build errors do not occur when disabling the future that applies to the condition string
because of WebCore objects and methods that are still in use despite the feature being disabled.

No new tests - covered by bindings tests.

* bindings/scripts/CodeGeneratorGObject.pm:
(WriteData):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: Rebaseline generated results.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Ditto.
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: Ditto.

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp

index ea63eb0..f522660 100644 (file)
@@ -1,3 +1,22 @@
+2012-04-27  Zan Dobersek  <zandobersek@gmail.com>
+
+        [Gtk][DOM Bindings] Conditional string in implementation file generated in wrong place after 113450
+        https://bugs.webkit.org/show_bug.cgi?id=85065
+
+        Reviewed by Martin Robinson.
+
+        Put the condition string in implementation file after the header inclusions. This ensures
+        that build errors do not occur when disabling the future that applies to the condition string
+        because of WebCore objects and methods that are still in use despite the feature being disabled.
+
+        No new tests - covered by bindings tests.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (WriteData):
+        * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: Rebaseline generated results.
+        * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Ditto.
+        * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: Ditto.
+
 2012-04-27  Andreas Kling  <kling@webkit.org>
 
         Avoid mutating Element attribute storage in StepRange constructor.
index 735221a..293c498 100644 (file)
@@ -1413,7 +1413,6 @@ EOF
     print IMPL @cPrefix;
     print IMPL "#include \"config.h\"\n";
     print IMPL "#include \"$installedHeaderFilename\"\n\n";
-    print IMPL "#if ${conditionalString}\n\n" if $conditionalString;
 
     # Remove the implementation header from the list of included files.
     %includesCopy = %implIncludes;
@@ -1423,6 +1422,7 @@ EOF
     print IMPL "#include <glib-object.h>\n";
     print IMPL "#include <wtf/GetPtr.h>\n";
     print IMPL "#include <wtf/RefPtr.h>\n\n";
+    print IMPL "#if ${conditionalString}\n\n" if $conditionalString;
 
     print IMPL "namespace WebKit {\n\n";
     print IMPL @cBodyPriv;
index 9db7704..5cb21fe 100644 (file)
@@ -21,8 +21,6 @@
 #include "config.h"
 #include "WebKitDOMTestCallback.h"
 
-#if ENABLE(SQL_DATABASE)
-
 #include "DOMObjectCache.h"
 #include "ExceptionCode.h"
 #include "JSMainThreadExecState.h"
@@ -49,6 +47,8 @@
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
+#if ENABLE(SQL_DATABASE)
+
 namespace WebKit {
 
 WebKitDOMTestCallback* kit(WebCore::TestCallback* obj)
index 01ab2b3..511926b 100644 (file)
@@ -21,8 +21,6 @@
 #include "config.h"
 #include "WebKitDOMTestInterface.h"
 
-#if ENABLE(Condition1) || ENABLE(Condition2)
-
 #include "DOMObjectCache.h"
 #include "ExceptionCode.h"
 #include "JSMainThreadExecState.h"
@@ -44,6 +42,8 @@
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
+#if ENABLE(Condition1) || ENABLE(Condition2)
+
 namespace WebKit {
 
 WebKitDOMTestInterface* kit(WebCore::TestInterface* obj)
index c764254..325cc86 100644 (file)
@@ -21,8 +21,6 @@
 #include "config.h"
 #include "WebKitDOMTestSerializedScriptValueInterface.h"
 
-#if ENABLE(Condition1) || ENABLE(Condition2)
-
 #include "DOMObjectCache.h"
 #include "ExceptionCode.h"
 #include "JSMainThreadExecState.h"
@@ -45,6 +43,8 @@
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
+#if ENABLE(Condition1) || ENABLE(Condition2)
+
 namespace WebKit {
 
 WebKitDOMTestSerializedScriptValueInterface* kit(WebCore::TestSerializedScriptValueInterface* obj)