Changeset 111535 in webkit


Ignore:
Timestamp:
Mar 21, 2012 6:52:44 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

https://bugs.webkit.org/show_bug.cgi?id=81761
Fix Gobject binding for sequence<T> for function return type.

Patch by Vineet Chaudhary <Vineet> 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:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r111533 r111535  
     12012-03-21  Vineet Chaudhary  <rgf748@motorola.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=81761
     4        Fix Gobject binding for sequence<T> for function return type.
     5
     6        Reviewed by Kentaro Hara.
     7
     8        No new tests.
     9
     10        * bindings/scripts/CodeGeneratorGObject.pm:
     11        (SkipFunction): Skip function with sequence<T> return type.
     12        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
     13        (webkit_dom_test_obj_method_with_sequence_arg):
     14        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
     15
    1162012-03-21  Andrey Kosyakov  <caseq@chromium.org>
    217
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r111416 r111535  
    193193
    194194    my $functionName = "webkit_dom_" . $decamelize . "_" . $prefix . decamelize($function->signature->name);
     195    my $functionReturnType = $prefix eq "set_" ? "void" : $function->signature->type;
    195196    my $isCustomFunction = $function->signature->extendedAttributes->{"Custom"};
    196197    my $callWith = $function->signature->extendedAttributes->{"CallWith"};
     
    212213
    213214    if ($function->signature->name eq "getCSSCanvasContext") {
     215        return 1;
     216    }
     217
     218    if ($codeGenerator->GetArrayType($functionReturnType)) {
    214219        return 1;
    215220    }
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp

    r111416 r111535  
    3434#include "bool.h"
    3535#include "gobject/ConvertToUTF8String.h"
    36 #include "sequence<ScriptProfile>.h"
    3736#include "webkit/WebKitDOMDictionary.h"
    3837#include "webkit/WebKitDOMDictionaryPrivate.h"
     
    6059#include "webkit/WebKitDOMePrivate.h"
    6160#include "webkit/WebKitDOMsequence.h"
    62 #include "webkit/WebKitDOMsequence<ScriptProfile>.h"
    63 #include "webkit/WebKitDOMsequence<ScriptProfile>Private.h"
    6461#include "webkit/WebKitDOMsequencePrivate.h"
    6562#include "webkitdefines.h"
     
    178175    }
    179176    item->methodWithSequenceArg(converted_);
    180 }
    181 
    182 WebKitDOMsequence<ScriptProfile>*
    183 webkit_dom_test_obj_method_returning_sequence(WebKitDOMTestObj* self, glong int_arg)
    184 {
    185     g_return_val_if_fail(self, 0);
    186     WebCore::JSMainThreadNullState state;
    187     WebCore::TestObj * item = WebKit::core(self);
    188     PassRefPtr<WebCore::sequence<ScriptProfile>> g_res = WTF::getPtr(item->methodReturningSequence(int_arg));
    189     WebKitDOMsequence<ScriptProfile>* res = WebKit::kit(g_res.get());
    190     return res;
    191177}
    192178
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h

    r111416 r111535  
    128128
    129129/**
    130  * webkit_dom_test_obj_method_returning_sequence:
    131  * @self: A #WebKitDOMTestObj
    132  * @int_arg: A #glong
    133  *
    134  * Returns: (transfer none):
    135  *
    136 **/
    137 WEBKIT_API WebKitDOMsequence<ScriptProfile>*
    138 webkit_dom_test_obj_method_returning_sequence(WebKitDOMTestObj* self, glong int_arg);
    139 
    140 /**
    141130 * webkit_dom_test_obj_method_that_requires_all_args_and_throws:
    142131 * @self: A #WebKitDOMTestObj
Note: See TracChangeset for help on using the changeset viewer.