Title: [111535] trunk/Source/WebCore
- Revision
- 111535
- Author
- [email protected]
- Date
- 2012-03-21 06:52:44 -0700 (Wed, 21 Mar 2012)
Log Message
https://bugs.webkit.org/show_bug.cgi?id=81761
Fix Gobject binding for sequence<T> for function return type.
Patch by Vineet Chaudhary <[email protected]> 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:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111534 => 111535)
--- trunk/Source/WebCore/ChangeLog 2012-03-21 13:43:30 UTC (rev 111534)
+++ trunk/Source/WebCore/ChangeLog 2012-03-21 13:52:44 UTC (rev 111535)
@@ -1,3 +1,18 @@
+2012-03-21 Vineet Chaudhary <[email protected]>
+
+ 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 <[email protected]>
Unreviewed build fix for r111529.
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm (111534 => 111535)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2012-03-21 13:43:30 UTC (rev 111534)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm 2012-03-21 13:52:44 UTC (rev 111535)
@@ -192,6 +192,7 @@
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");
@@ -214,6 +215,10 @@
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
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (111534 => 111535)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2012-03-21 13:43:30 UTC (rev 111534)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2012-03-21 13:52:44 UTC (rev 111535)
@@ -33,7 +33,6 @@
#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"
@@ -59,8 +58,6 @@
#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"
@@ -179,17 +176,6 @@
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)
{
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (111534 => 111535)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h 2012-03-21 13:43:30 UTC (rev 111534)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h 2012-03-21 13:52:44 UTC (rev 111535)
@@ -127,17 +127,6 @@
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
* @str_arg: A #gchar
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes