RESOLVED FIXED 83943
Add V8 code generation support for MessagePorts attributes.
https://bugs.webkit.org/show_bug.cgi?id=83943
Summary Add V8 code generation support for MessagePorts attributes.
Greg Billock
Reported 2012-04-13 14:04:13 PDT
Add V8 code generation support for MessagePorts attributes.
Attachments
Patch (20.38 KB, patch)
2012-04-13 14:04 PDT, Greg Billock
no flags
Patch (21.85 KB, patch)
2012-04-16 11:49 PDT, Greg Billock
no flags
Greg Billock
Comment 1 2012-04-13 14:04:57 PDT
Greg Billock
Comment 2 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
Adam Barth
Comment 3 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.
Adam Barth
Comment 4 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.
Kentaro Hara
Comment 5 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?
Greg Billock
Comment 6 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?
Kentaro Hara
Comment 7 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.
Greg Billock
Comment 8 2012-04-16 11:49:11 PDT
Greg Billock
Comment 9 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.
Kentaro Hara
Comment 10 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?)
Greg Billock
Comment 11 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.
Kentaro Hara
Comment 12 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.
Greg Billock
Comment 13 2012-04-16 16:11:59 PDT
WebKit Review Bot
Comment 14 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>
WebKit Review Bot
Comment 15 2012-04-16 16:50:59 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.