Bug 145833

Summary: Bindings generator should generate code for Promise-based APIs
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Severity: Normal CC: commit-queue, darin, ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 145894    
Bug Blocks:    
Description Flags
Adding test
Patch for landing
Rebasing expectations none

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]
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.