New issue
Advanced search Search tips

Issue 798467 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

bindings: Decide whether we need both ImplType and ResultType for all IDL types

Project Member Reported by raphael....@intel.com, Jan 2 2018

Issue description

This came up in https://chromium-review.googlesource.com/c/chromium/src/+/831497.

Right now most IDL* classes only have an ImplType typedef, with the exception being IDLNullable, which has both ImplType and ReturnType, mostly because interface types (e.g. Node) have ImplType == Node and ResultType == Node*.

We should figure out if we should have both in all IDL classes, or make IDLNullable work with only one of them.
 
I suspect we could change ImplType to be Node* (etc) but it would require an audit of existing uses.
Is Oilpan able to handle WTF::IsGarbageCollected<Node*>, for example?
It would be easy to use WTF::IsGarbageCollectedType<std::remove_pointer_t<Node*>>.
*Must remember C++11 exists, must remember C++11 exists...*
Cc: peria@chromium.org
Well, I vaguely think that we might need several kinds of type in bindings.  This is off from "Nullable".  I vaguely remember that Dictionaries and unions are created off heap, passed-by-reference, returned-by-value.

    MyDict dict = MyDict::Create(...);  // return-by-value
    // void method(MyDict&);
    obj->method(dict);  // call-by-reference

I don't have a conclusion yet, but I've been thinking about "to have pointer_like_type, reference_like_type, value_like_type" (grouped-by-mechanism) or "to have arg_type, return_type, member_type, etc." (grouped-by-purpose) or something else.

Project Member

Comment 6 by sheriffbot@chromium.org, Jan 10

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment