Bug 81761

Summary: Fix Gobject binding for sequence<T> for function return type.
Product: WebKit Reporter: Arko Saha <arko>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, code.vineet, haraken, japhet, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 80269    
Attachments:
Description Flags
quick_fix
none
Patch none

Description Arko Saha 2012-03-21 04:38:58 PDT
After r111416 <http://trac.webkit.org/changeset/111416> revision I was trying to remove the custom binding for [Custom] Array getValues() and using sequence<MicroDataItemValue> getValues(). It works for JS bindings but for Gobject bindings it is trying to include #include "sequence<MicroDataItemValue>.h" in WebKitDOMPropertyNodeList.cpp. We should fix the same.
Comment 1 Vineet Chaudhary (vineetc) 2012-03-21 04:56:40 PDT
Should we skip the function in the GObject Bindings?
Comment 2 Vineet Chaudhary (vineetc) 2012-03-21 05:18:04 PDT
Created attachment 133017 [details]
quick_fix

Providing quick fix. This should solve your current build issue, but not sure if want these bindings in GObject.
I can see some changes in binding like below not related to this change, someone might have forgot to run bindings tests.

-#import <wtf/Float32Array.h>
-#import <wtf/Float64Array.h>
-#import <wtf/Int32Array.h>
+#import "Float32Array.h"
+#import "Float64Array.h"
+#import "Int32Array.h"
Comment 3 WebKit Review Bot 2012-03-21 05:23:25 PDT
Attachment 133017 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:28:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:26:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Kentaro Hara 2012-03-21 05:47:20 PDT
Comment on attachment 133017 [details]
quick_fix

View in context: https://bugs.webkit.org/attachment.cgi?id=133017&action=review

The change looks OK. If you want, please change r to r?.

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:214
> +    if ($codeGenerator->GetArrayType($functionReturnType)) {

Maybe we can just write $codeGenerator->GetArrayType($function->signature->type). $function->signature->type for setters would be empty.
Comment 5 Kentaro Hara 2012-03-21 05:54:11 PDT
(In reply to comment #2)
> Created an attachment (id=133017) [details]
> quick_fix
> 
> Providing quick fix. This should solve your current build issue, but not sure if want these bindings in GObject.
> I can see some changes in binding like below not related to this change, someone might have forgot to run bindings tests.
> 
> -#import <wtf/Float32Array.h>
> -#import <wtf/Float64Array.h>
> -#import <wtf/Int32Array.h>
> +#import "Float32Array.h"
> +#import "Float64Array.h"
> +#import "Int32Array.h"

I rebaselined the run-bindings-tests results. Would you please rebase your patch with the latest WebKit trunk and re-upload it?
Comment 6 Kentaro Hara 2012-03-21 05:55:15 PDT
(In reply to comment #4)
> > Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:214
> > +    if ($codeGenerator->GetArrayType($functionReturnType)) {
> 
> Maybe we can just write $codeGenerator->GetArrayType($function->signature->type). $function->signature->type for setters would be empty.

Sorry, your change is correct. Please ignore the above comment.
Comment 7 Vineet Chaudhary (vineetc) 2012-03-21 06:04:44 PDT
Created attachment 133028 [details]
Patch

patch as per review comments.
Comment 8 Kentaro Hara 2012-03-21 06:19:59 PDT
Comment on attachment 133028 [details]
Patch

OK. Thanks for the fix!
Comment 9 WebKit Review Bot 2012-03-21 06:53:00 PDT
Comment on attachment 133028 [details]
Patch

Clearing flags on attachment: 133028

Committed r111535: <http://trac.webkit.org/changeset/111535>
Comment 10 WebKit Review Bot 2012-03-21 06:53:05 PDT
All reviewed patches have been landed.  Closing bug.