Add V8 code generation support for MessagePorts attributes.
Created attachment 137145 [details] Patch
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 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, I'm about to go on vacation for two weeks, but hopefully Kentaro will be able to work with you on this patch.
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 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?
(In reply to comment #6) > Is there any sort of "IDLTypes" list I need to update? No:) The type is not checked anywhere.
Created attachment 137371 [details] Patch
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 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?)
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 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.
Filed https://bugs.webkit.org/show_bug.cgi?id=84093
Comment on attachment 137371 [details] Patch Clearing flags on attachment: 137371 Committed r114319: <http://trac.webkit.org/changeset/114319>
All reviewed patches have been landed. Closing bug.