Bug 115250 - Get rid of [Callback] IDL extended attribute for parameters
Summary: Get rid of [Callback] IDL extended attribute for parameters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 115247
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-26 05:27 PDT by Chris Dumez
Modified: 2013-04-30 01:08 PDT (History)
19 users (show)

See Also:


Attachments
Patch (47.52 KB, patch)
2013-04-26 13:07 PDT, Chris Dumez
gtk-ews: commit-queue-
Details | Formatted Diff | Diff
Patch (49.83 KB, patch)
2013-04-26 13:59 PDT, Chris Dumez
gtk-ews: commit-queue-
Details | Formatted Diff | Diff
Patch (50.75 KB, patch)
2013-04-26 14:52 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (50.76 KB, patch)
2013-04-26 14:56 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (50.99 KB, patch)
2013-04-26 15:07 PDT, Chris Dumez
gtk-ews: commit-queue-
Details | Formatted Diff | Diff
Patch (51.87 KB, patch)
2013-04-26 16:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (104.11 KB, patch)
2013-04-27 06:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2013-04-26 05:27:00 PDT
The [Callback] IDL extended attribute is not part of the Web IDL specification and should not be needed. The bindings generator should be smart enough to know by itself if a parameter's type is a callback interface.

This will results in simpler IDL files and closer to the standard.
Comment 1 Chris Dumez 2013-04-26 13:07:53 PDT
Created attachment 199853 [details]
Patch
Comment 2 kov's GTK+ EWS bot 2013-04-26 13:26:22 PDT
Comment on attachment 199853 [details]
Patch

Attachment 199853 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/133502
Comment 3 Build Bot 2013-04-26 13:29:05 PDT
Comment on attachment 199853 [details]
Patch

Attachment 199853 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/133498
Comment 4 Build Bot 2013-04-26 13:32:04 PDT
Comment on attachment 199853 [details]
Patch

Attachment 199853 [details] did not pass win-ews (win):
Output: http://webkit-queues.appspot.com/results/188022
Comment 5 Build Bot 2013-04-26 13:47:02 PDT
Comment on attachment 199853 [details]
Patch

Attachment 199853 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/133499
Comment 6 Chris Dumez 2013-04-26 13:59:27 PDT
Created attachment 199856 [details]
Patch
Comment 7 kov's GTK+ EWS bot 2013-04-26 14:08:05 PDT
Comment on attachment 199856 [details]
Patch

Attachment 199856 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/14513
Comment 8 Chris Dumez 2013-04-26 14:52:05 PDT
Created attachment 199863 [details]
Patch
Comment 9 Chris Dumez 2013-04-26 14:56:39 PDT
Created attachment 199865 [details]
Patch
Comment 10 Chris Dumez 2013-04-26 15:07:19 PDT
Created attachment 199866 [details]
Patch
Comment 11 kov's GTK+ EWS bot 2013-04-26 15:14:32 PDT
Comment on attachment 199866 [details]
Patch

Attachment 199866 [details] did not pass gtk-wk2-ews (gtk-wk2):
Output: http://webkit-queues.appspot.com/results/43916
Comment 12 kov's GTK+ EWS bot 2013-04-26 15:15:27 PDT
Comment on attachment 199866 [details]
Patch

Attachment 199866 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/13432
Comment 13 Chris Dumez 2013-04-26 16:36:00 PDT
Created attachment 199873 [details]
Patch

Should fix GTK ews.
Comment 14 Kentaro Hara 2013-04-26 22:20:57 PDT
Comment on attachment 199873 [details]
Patch

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

> Source/WebCore/Modules/webdatabase/SQLTransaction.idl:37
> +                             in [Optional] SQLStatementCallback callback,

Maybe you want to replace [Optional] with 'optional' when you have time. It's already done in Blink :)

> Source/WebCore/bindings/scripts/CodeGenerator.pm:431
> +    return 0 if $type eq "Array";

This wouldn't be needed since it is already checked in GetArrayType().

> Source/WebCore/bindings/scripts/CodeGenerator.pm:679
> +  return 0 unless $object->IsRefPtrType($type);
> +  return 0 if $type eq "SerializedScriptValue";

Why do you want to write SerializedScriptValue here instead of in IsRefPtrType().

Actually I'm not sure if we should use IsRefPtrType() here. Maybe we should introduce IsWrapperType() for this use, just like V8 does.
Comment 15 Chris Dumez 2013-04-26 23:52:25 PDT
Comment on attachment 199873 [details]
Patch

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

>> Source/WebCore/Modules/webdatabase/SQLTransaction.idl:37
>> +                             in [Optional] SQLStatementCallback callback,
> 
> Maybe you want to replace [Optional] with 'optional' when you have time. It's already done in Blink :)

On my TODO list :)

>> Source/WebCore/bindings/scripts/CodeGenerator.pm:431
>> +    return 0 if $type eq "Array";
> 
> This wouldn't be needed since it is already checked in GetArrayType().

ok

>> Source/WebCore/bindings/scripts/CodeGenerator.pm:679
>> +  return 0 if $type eq "SerializedScriptValue";
> 
> Why do you want to write SerializedScriptValue here instead of in IsRefPtrType().
> 
> Actually I'm not sure if we should use IsRefPtrType() here. Maybe we should introduce IsWrapperType() for this use, just like V8 does.

Well, SerializedScriptValue is a RefPtr type so I cannot move it to IsRefPtrType().

Anyway, I think you are right, introducing an IsWrapperType() would probably be clearer and we would avoid editing existing functions.
Comment 16 Chris Dumez 2013-04-27 05:42:31 PDT
Comment on attachment 199873 [details]
Patch

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

>>> Source/WebCore/bindings/scripts/CodeGenerator.pm:431
>>> +    return 0 if $type eq "Array";
>> 
>> This wouldn't be needed since it is already checked in GetArrayType().
> 
> ok

Actually GetArrayType() return the array subtype: return $1 if $type =~ /^([\w\d_\s]+)\[\]/;
Therefore, it is not applicable to the "Array" type.
Comment 17 Chris Dumez 2013-04-27 06:17:35 PDT
Created attachment 199902 [details]
Patch

Introduce IsWrapperType subroutine.
Comment 18 Kentaro Hara 2013-04-28 01:50:08 PDT
Comment on attachment 199902 [details]
Patch

Looks good.
Comment 19 WebKit Commit Bot 2013-04-28 02:36:28 PDT
The commit-queue encountered the following flaky tests while processing attachment 199902 [details]:

fast/frames/crash-remove-iframe-during-object-beforeload.html bug 115322 (author: zalan@apple.com)
The commit-queue is continuing to process your patch.
Comment 20 WebKit Commit Bot 2013-04-28 02:37:27 PDT
Comment on attachment 199902 [details]
Patch

Clearing flags on attachment: 199902

Committed r149257: <http://trac.webkit.org/changeset/149257>
Comment 21 WebKit Commit Bot 2013-04-28 02:37:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 22 Chris Dumez 2013-04-30 01:08:18 PDT
Updated WebKitIDL wiki accordingly:
http://trac.webkit.org/wiki/WebKitIDL?action=diff&version=90&old_version=89