Bug 83943 - Add V8 code generation support for MessagePorts attributes.
Summary: Add V8 code generation support for MessagePorts attributes.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Greg Billock
URL:
Keywords:
Depends on:
Blocks: 83634
  Show dependency treegraph
 
Reported: 2012-04-13 14:04 PDT by Greg Billock
Modified: 2012-04-16 16:50 PDT (History)
6 users (show)

See Also:


Attachments
Patch (20.38 KB, patch)
2012-04-13 14:04 PDT, Greg Billock
no flags Details | Formatted Diff | Diff
Patch (21.85 KB, patch)
2012-04-16 11:49 PDT, Greg Billock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Billock 2012-04-13 14:04:13 PDT
Add V8 code generation support for MessagePorts attributes.
Comment 1 Greg Billock 2012-04-13 14:04:57 PDT
Created attachment 137145 [details]
Patch
Comment 2 Greg Billock 2012-04-13 14:09:38 PDT
Context: https://bugs.webkit.org/show_bug.cgi?id=83634

The approach here adds a "MessagePortArray" attribute for special handling of Array return types which are message port arrays. See also http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp
Comment 3 Adam Barth 2012-04-13 14:36:29 PDT
Comment on attachment 137145 [details]
Patch

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

> Source/WebCore/bindings/scripts/test/TestSerializedScriptValueInterface.idl:37
> +        readonly attribute [MessagePortArray] Array ports;

This looks pretty good, but I wonder if we should just use the type "MessagePortArray" instead of "Array".  Then we wouldn't need to introduce a new IDL attribute.
Comment 4 Adam Barth 2012-04-13 14:37:04 PDT
Greg, I'm about to go on vacation for two weeks, but hopefully Kentaro will be able to work with you on this patch.
Comment 5 Kentaro Hara 2012-04-16 09:38:05 PDT
Comment on attachment 137145 [details]
Patch

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

>> Source/WebCore/bindings/scripts/test/TestSerializedScriptValueInterface.idl:37
>> +        readonly attribute [MessagePortArray] Array ports;
> 
> This looks pretty good, but I wonder if we should just use the type "MessagePortArray" instead of "Array".  Then we wouldn't need to introduce a new IDL attribute.

Greg: Same comment. Would you update the patch?
Comment 6 Greg Billock 2012-04-16 11:25:43 PDT
Comment on attachment 137145 [details]
Patch

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

>>> Source/WebCore/bindings/scripts/test/TestSerializedScriptValueInterface.idl:37
>>> +        readonly attribute [MessagePortArray] Array ports;
>> 
>> This looks pretty good, but I wonder if we should just use the type "MessagePortArray" instead of "Array".  Then we wouldn't need to introduce a new IDL attribute.
> 
> Greg: Same comment. Would you update the patch?

I'm definitely cool with that. I was trying to hew close to the existing usage, but it'd definitely be easier to use that type. I'm not stepping on any other toes doing that, right? Is there any sort of "IDLTypes" list I need to update?
Comment 7 Kentaro Hara 2012-04-16 11:28:01 PDT
(In reply to comment #6)
> Is there any sort of "IDLTypes" list I need to update?

No:) The type is not checked anywhere.
Comment 8 Greg Billock 2012-04-16 11:49:11 PDT
Created attachment 137371 [details]
Patch
Comment 9 Greg Billock 2012-04-16 11:50:45 PDT
Diff to patch 1 is changing the check in codegen. There's a bit of skew in the generated files, but there were no changes in the generated handling for MessagePortArray types.
Comment 10 Kentaro Hara 2012-04-16 12:20:50 PDT
Comment on attachment 137371 [details]
Patch

The change looks good. What is the plan for JSC/GObject/CPP/ObjC? (i.e. should we generate some code or skip generating code for those bindings?)
Comment 11 Greg Billock 2012-04-16 16:03:39 PDT
I made a similarly aimed change for transfer parameters code gen (https://bugs.webkit.org/show_bug.cgi?id=81127). There we filed https://bugs.webkit.org/show_bug.cgi?id=82264 for a JSC implementation.
Comment 12 Kentaro Hara 2012-04-16 16:06:29 PDT
Comment on attachment 137371 [details]
Patch

OK. Then please file a bug for JSC, and please work on it sooner or later. We want to make V8 and JSC consistent.
Comment 13 Greg Billock 2012-04-16 16:11:59 PDT
Filed https://bugs.webkit.org/show_bug.cgi?id=84093
Comment 14 WebKit Review Bot 2012-04-16 16:50:54 PDT
Comment on attachment 137371 [details]
Patch

Clearing flags on attachment: 137371

Committed r114319: <http://trac.webkit.org/changeset/114319>
Comment 15 WebKit Review Bot 2012-04-16 16:50:59 PDT
All reviewed patches have been landed.  Closing bug.