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
+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.
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");
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
#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/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"
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)
{
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