Bug 145833 - Bindings generator should generate code for Promise-based APIs
Summary: Bindings generator should generate code for Promise-based APIs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on: 145894
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-10 00:37 PDT by youenn fablet
Modified: 2015-06-12 02:26 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.49 KB, patch)
2015-06-10 02:00 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Adding test (13.63 KB, patch)
2015-06-11 00:36 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (13.62 KB, patch)
2015-06-11 11:30 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Rebasing expectations (13.72 KB, patch)
2015-06-12 01:35 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-06-10 00:37:15 PDT
Currently, binding code promise based APIs need to be made manually.
It could be generated automatically based on direct use of DeferredWrapper or indirect use of DeferredWrapper through DOMPromise.
Comment 1 youenn fablet 2015-06-10 02:00:31 PDT
Created attachment 254638 [details]
Patch
Comment 2 youenn fablet 2015-06-11 00:36:54 PDT
Created attachment 254711 [details]
Adding test
Comment 3 Darin Adler 2015-06-11 10:13:23 PDT
Comment on attachment 254711 [details]
Adding test

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

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3662
> +            push(@implContent, $indent . "JSPromiseDeferred* promiseDeferred = JSPromiseDeferred::create(exec, castedThis->globalObject());\n");

I think auto* would be better; no need to repeat the type twice on the same line of code.
Comment 4 youenn fablet 2015-06-11 11:30:27 PDT
Created attachment 254733 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2015-06-11 12:27:22 PDT
Comment on attachment 254733 [details]
Patch for landing

Clearing flags on attachment: 254733

Committed r185464: <http://trac.webkit.org/changeset/185464>
Comment 6 WebKit Commit Bot 2015-06-11 12:27:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Commit Bot 2015-06-11 13:15:35 PDT
Re-opened since this is blocked by bug 145894
Comment 8 Alexey Proskuryakov 2015-06-11 13:40:03 PDT
The rollout bug says that this broke bindings tests, however it seems to have broken more than just those: <https://build.webkit.org/builders/Apple%20Yosemite%20Release%20WK2%20(Tests)/builds/5960>.
Comment 9 youenn fablet 2015-06-12 01:35:17 PDT
Created attachment 254780 [details]
Rebasing expectations
Comment 10 WebKit Commit Bot 2015-06-12 02:26:21 PDT
Comment on attachment 254780 [details]
Rebasing expectations

Clearing flags on attachment: 254780

Committed r185493: <http://trac.webkit.org/changeset/185493>
Comment 11 WebKit Commit Bot 2015-06-12 02:26:28 PDT
All reviewed patches have been landed.  Closing bug.