https://bugs.webkit.org/show_bug.cgi?id=81761
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 13:52:44 +0000 (13:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2012 13:52:44 +0000 (13:52 +0000)
Fix Gobject binding for sequence<T> for function return type.

Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-03-21
Reviewed by Kentaro Hara.

No new tests.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Skip function with sequence<T> return type.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_method_with_sequence_arg):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h

index 91ea00bb42852dc57696f0601b8bb5e197d4cdd1..9fab936958fb7efa38e3568f87533677c0990564 100644 (file)
@@ -1,3 +1,18 @@
+2012-03-21  Vineet Chaudhary  <rgf748@motorola.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=81761
+        Fix Gobject binding for sequence<T> for function return type.
+
+        Reviewed by Kentaro Hara.
+
+        No new tests.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (SkipFunction): Skip function with sequence<T> return type.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        (webkit_dom_test_obj_method_with_sequence_arg):
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+
 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
 
         Unreviewed build fix for r111529.
 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
 
         Unreviewed build fix for r111529.
index 6c11926cb1b8d2bc45327be7179cb226d45b9030..21134d47b5c0dbac570d72208c7dac6ebeed2f2d 100644 (file)
@@ -192,6 +192,7 @@ sub SkipFunction {
     my $prefix = shift;
 
     my $functionName = "webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name);
     my $prefix = shift;
 
     my $functionName = "webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name);
+    my $functionReturnType = $prefix eq "set_" ? "void" : $function->signature->type;
     my $isCustomFunction = $function->signature->extendedAttributes->{"Custom"};
     my $callWith = $function->signature->extendedAttributes->{"CallWith"};
     my $isUnsupportedCallWith = $codeGenerator->ExtendedAttributeContains($callWith, "ScriptArguments") || $codeGenerator->ExtendedAttributeContains($callWith, "CallStack");
     my $isCustomFunction = $function->signature->extendedAttributes->{"Custom"};
     my $callWith = $function->signature->extendedAttributes->{"CallWith"};
     my $isUnsupportedCallWith = $codeGenerator->ExtendedAttributeContains($callWith, "ScriptArguments") || $codeGenerator->ExtendedAttributeContains($callWith, "CallStack");
@@ -214,6 +215,10 @@ sub SkipFunction {
         return 1;
     }
 
         return 1;
     }
 
+    if ($codeGenerator->GetArrayType($functionReturnType)) {
+        return 1;
+    }
+
     # Skip functions that have ["Callback"] parameters, because this
     # code generator doesn't know how to auto-generate callbacks.
     # Skip functions that have "MediaQueryListListener" parameters, because this
     # Skip functions that have ["Callback"] parameters, because this
     # code generator doesn't know how to auto-generate callbacks.
     # Skip functions that have "MediaQueryListListener" parameters, because this
index 80693d4add5e31aeaf606977fa249d6fa2ee0460..227ac9f062d88856e6e2af91c65053662476188c 100644 (file)
@@ -33,7 +33,6 @@
 #include "WebKitDOMBinding.h"
 #include "bool.h"
 #include "gobject/ConvertToUTF8String.h"
 #include "WebKitDOMBinding.h"
 #include "bool.h"
 #include "gobject/ConvertToUTF8String.h"
-#include "sequence<ScriptProfile>.h"
 #include "webkit/WebKitDOMDictionary.h"
 #include "webkit/WebKitDOMDictionaryPrivate.h"
 #include "webkit/WebKitDOMDocument.h"
 #include "webkit/WebKitDOMDictionary.h"
 #include "webkit/WebKitDOMDictionaryPrivate.h"
 #include "webkit/WebKitDOMDocument.h"
@@ -59,8 +58,6 @@
 #include "webkit/WebKitDOMe.h"
 #include "webkit/WebKitDOMePrivate.h"
 #include "webkit/WebKitDOMsequence.h"
 #include "webkit/WebKitDOMe.h"
 #include "webkit/WebKitDOMePrivate.h"
 #include "webkit/WebKitDOMsequence.h"
-#include "webkit/WebKitDOMsequence<ScriptProfile>.h"
-#include "webkit/WebKitDOMsequence<ScriptProfile>Private.h"
 #include "webkit/WebKitDOMsequencePrivate.h"
 #include "webkitdefines.h"
 #include "webkitglobalsprivate.h"
 #include "webkit/WebKitDOMsequencePrivate.h"
 #include "webkitdefines.h"
 #include "webkitglobalsprivate.h"
@@ -179,17 +176,6 @@ webkit_dom_test_obj_method_with_sequence_arg(WebKitDOMTestObj* self, WebKitDOMse
     item->methodWithSequenceArg(converted_);
 }
 
     item->methodWithSequenceArg(converted_);
 }
 
-WebKitDOMsequence<ScriptProfile>*
-webkit_dom_test_obj_method_returning_sequence(WebKitDOMTestObj* self, glong int_arg)
-{
-    g_return_val_if_fail(self, 0);
-    WebCore::JSMainThreadNullState state;
-    WebCore::TestObj * item = WebKit::core(self);
-    PassRefPtr<WebCore::sequence<ScriptProfile>> g_res = WTF::getPtr(item->methodReturningSequence(int_arg));
-    WebKitDOMsequence<ScriptProfile>* res = WebKit::kit(g_res.get());
-    return res;
-}
-
 WebKitDOMTestObj*
 webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* self, const gchar* str_arg, WebKitDOMTestObj* obj_arg, GError **error)
 {
 WebKitDOMTestObj*
 webkit_dom_test_obj_method_that_requires_all_args_and_throws(WebKitDOMTestObj* self, const gchar* str_arg, WebKitDOMTestObj* obj_arg, GError **error)
 {
index b94ebae2f8b3394bc1466d050b41de0a9a2c1109..fc024acc8d4c6ba630d1ef0df1a190f3f0a713d2 100644 (file)
@@ -126,17 +126,6 @@ webkit_dom_test_obj_obj_method_with_args(WebKitDOMTestObj* self, glong int_arg,
 WEBKIT_API void
 webkit_dom_test_obj_method_with_sequence_arg(WebKitDOMTestObj* self, WebKitDOMsequence* );
 
 WEBKIT_API void
 webkit_dom_test_obj_method_with_sequence_arg(WebKitDOMTestObj* self, WebKitDOMsequence* );
 
-/**
- * webkit_dom_test_obj_method_returning_sequence:
- * @self: A #WebKitDOMTestObj
- * @int_arg: A #glong
- *
- * Returns: (transfer none):
- *
-**/
-WEBKIT_API WebKitDOMsequence<ScriptProfile>*
-webkit_dom_test_obj_method_returning_sequence(WebKitDOMTestObj* self, glong int_arg);
-
 /**
  * webkit_dom_test_obj_method_that_requires_all_args_and_throws:
  * @self: A #WebKitDOMTestObj
 /**
  * webkit_dom_test_obj_method_that_requires_all_args_and_throws:
  * @self: A #WebKitDOMTestObj