Bug 145056 - JS binding generator should create a member variable for each Promise attribute of an interface
Summary: JS binding generator should create a member variable for each Promise attribu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 09:01 PDT by youenn fablet
Modified: 2015-08-10 09:37 PDT (History)
6 users (show)

See Also:


Attachments
Patch (9.60 KB, patch)
2015-05-15 09:16 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2015-05-15 09:01:14 PDT
As shown currently in ReadableStreamReader.idl, attributes may be Promise.
In that case, it would be nice for JS-generated classes to have a promise member so that it does not get stored in a different ways (by the implementation class or as show in JSReadableStreamReaderCustom as an internal slot).

This would be a first step towards promise attribute binding without custom getter.
Comment 1 youenn fablet 2015-05-15 09:16:31 PDT
Created attachment 253201 [details]
Patch
Comment 2 Darin Adler 2015-05-20 08:46:19 PDT
Comment on attachment 253201 [details]
Patch

Can we include a test of this on actual interfaces we implement, not just bindings regression tests?
Comment 3 Darin Adler 2015-05-20 08:46:49 PDT
Oh, I see, the only one is new in ReadableStreamReader?
Comment 4 youenn fablet 2015-05-20 09:11:21 PDT
(In reply to comment #3)
> Oh, I see, the only one is new in ReadableStreamReader?

Yes.

Once we have this patch landed, plan is to use that in ReadableStreamReader and remove the "internal slot" current "hack" and related routines.

We can also merge the two patches.

Once automated promise function binding generation is done, we might be able to tackle promise attribute binding generation if that is worth it
Comment 5 WebKit Commit Bot 2015-05-20 10:39:20 PDT
Comment on attachment 253201 [details]
Patch

Clearing flags on attachment: 253201

Committed r184643: <http://trac.webkit.org/changeset/184643>
Comment 6 WebKit Commit Bot 2015-05-20 10:39:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 youenn fablet 2015-08-10 09:37:23 PDT
Plan is to revert these changes as a solution based on CachedAttribute seems more appropriate.
See https://bugs.webkit.org/show_bug.cgi?id=147828